Skip to main content

get_current_date

Function get_current_date 

Source
pub fn get_current_date() -> String
Expand description

Returns today’s local date as a YYYY-MM-DD string.

The formatted string is cached behind an RwLock and only recomputed when the local calendar day changes, so repeated calls within the same day (e.g. tagging every aggregated row) avoid re-running strftime. A poisoned lock degrades gracefully: the value is recomputed without touching the cache rather than panicking.