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

Function timestamp

atomic-cli/src/output/colors.rs:425–427  ·  view source on GitHub ↗

Format a timestamp in dim style. Use this for dates, times, and timestamps. # Arguments `text` - The timestamp to format # Returns A styled object that displays in dim when printed. # Example ```rust,ignore println!("Created: {}", colors::timestamp("2024-01-15 10:30:00")); ```

(text: D)

Source from the content-addressed store, hash-verified

423/// println!("Created: {}", colors::timestamp("2024-01-15 10:30:00"));
424/// ```
425pub fn timestamp<D: std::fmt::Display>(text: D) -> StyledObject<D> {
426 style(text).dim()
427}
428
429/// Format an author name in default style.
430///

Callers 2

Calls

no outgoing calls

Tested by 2