Skip to main content

format_date_long

Function format_date_long 

Source
pub fn format_date_long(
    year: i32,
    month: u32,
    day: u32,
    locale: Locale,
) -> String
Expand description

Long date with the localized month name (e.g. "5. Januar 2026", "January 5, 2026"). Polish and Ukrainian use the genitive month ("31 grudnia 2026", "5 травня 2026 р."), as the platform does.

use mobiler_core::format::{format_date_long, Locale};
assert_eq!(format_date_long(2026, 1, 5, Locale::DeCh), "5. Januar 2026");
assert_eq!(format_date_long(2026, 1, 5, Locale::EnUs), "January 5, 2026");