Skip to main content

format_date

Function format_date 

Source
pub fn format_date(date: &NaiveDate) -> String
Expand description

Format a date for display

ยงExamples

use things3_common::format_date;
use chrono::NaiveDate;

let date = NaiveDate::from_ymd_opt(2024, 1, 15).unwrap();
assert_eq!(format_date(&date), "2024-01-15");