Skip to content

CBL-7773: Remove date.h and use std::chrono - #2420

Open
jianminzhao wants to merge 1 commit into
masterfrom
cbl-7773
Open

CBL-7773: Remove date.h and use std::chrono#2420
jianminzhao wants to merge 1 commit into
masterfrom
cbl-7773

Conversation

@jianminzhao

Copy link
Copy Markdown
Contributor

No description provided.

@jianminzhao
jianminzhao force-pushed the cbl-7773 branch 4 times, most recently from c61953e to f558458 Compare January 18, 2026 01:23
@cbl-bot

cbl-bot commented Jan 18, 2026

Copy link
Copy Markdown

Code Coverage Results:

Type Percentage
branches 64.61
functions 77.11
instantiations 71.05
lines 76.04
mcdc 0.0
regions 70.08

@jianminzhao
jianminzhao force-pushed the cbl-7773 branch 3 times, most recently from e3b2dd3 to c0a605c Compare September 1, 2026 00:11
date.h (Howard Hinnant's date library) is fully removed. In its place,
a single function, fleece::format(fmt, tp) in ParseDate.hh, is the one
seam for the piece of std::chrono that still isn't consistently
available everywhere: std::format's chrono-aware formatting. It calls
std::format directly wherever a toolchain has it, and falls back to a small
hand-written formatter otherwise, covering just the specifiers this
codebase needs (%F, %T, %Y, %m, %d, %H, %M, %S, %A, %c). That fallback
reproduces date.h's own logic, verified to produce byte-identical
output, without depending on it.

Once Linux's toolchain baseline reaches libstdc++ 13+, dropping this
is a single, isolated change: remove the __linux__ clause from the
"laggers" condition at the top of ParseDate.hh, and associated associated
source. Nothing else needs to change.

- Changed Jenkins agent for iOS and MacOS from "sonoma" to "tahoe"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants