Skip to main content

current_date_ymd

Function current_date_ymd 

Source
pub fn current_date_ymd() -> String
Expand description

Returns the current UTC date formatted as YYYY-MM-DD.

Computes date from system time using Gregorian calendar arithmetic without external dependencies.

ยงExample

use git_claw::workflow::changelog::current_date_ymd;

let today = current_date_ymd();
assert_eq!(today.len(), 10);
assert_eq!(&today[4..5], "-");
assert_eq!(&today[7..8], "-");