Skip to main content

convert_date_format

Function convert_date_format 

Source
pub fn convert_date_format(input: &str) -> String
Expand description

Converts date strings from various formats to “YYYY-MM-DD”.

Supports conversion from “DD MMM YYYY” format and checks if input is already in target format.

§Arguments

  • input - A string slice representing the input date.

§Returns

A string representing the date in “YYYY-MM-DD” format, or the original input if conversion is not applicable.