fix: duplicate time format str

This commit is contained in:
nathan
2022-09-25 10:57:40 +08:00
parent a1b54e0646
commit d6d8b4da5a
11 changed files with 20 additions and 20 deletions

View File

@ -24,7 +24,7 @@ mod tests {
assert_date(&type_option, 1647251762, None, "2022-03-14", &field_rev);
}
DateFormat::Local => {
assert_date(&type_option, 1647251762, None, "2022/03/14", &field_rev);
assert_date(&type_option, 1647251762, None, "03/14/2022", &field_rev);
}
}
}

View File

@ -153,7 +153,7 @@ impl DateFormat {
// https://docs.rs/chrono/0.4.19/chrono/format/strftime/index.html
pub fn format_str(&self) -> &'static str {
match self {
DateFormat::Local => "%Y/%m/%d",
DateFormat::Local => "%m/%d/%Y",
DateFormat::US => "%Y/%m/%d",
DateFormat::ISO => "%Y-%m-%d",
DateFormat::Friendly => "%b %d,%Y",