Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
53
fn 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)]
62
mod tests {
Callers
nothing calls this directly
Calls
3
len
Method · 0.45
all
Method · 0.45
bytes
Method · 0.45
Tested by
no test coverage detected