MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / is_iso_date

Function is_iso_date

atomic-cli/src/logging/retention.rs:53–59  ·  view source on GitHub ↗
(text: &str)

Source from the content-addressed store, hash-verified

51}
52
53fn is_iso_date(text: &str) -> bool {
54 text.len() == 10
55 && text.bytes().enumerate().all(|(index, byte)| match index {
56 4 | 7 => byte == b'-',
57 _ => byte.is_ascii_digit(),
58 })
59}
60
61#[cfg(test)]
62mod tests {

Callers

nothing calls this directly

Calls 3

lenMethod · 0.45
allMethod · 0.45
bytesMethod · 0.45

Tested by

no test coverage detected