Alex-PK / chrono-locale

Support localization for dates in chrono
Other
3 stars 6 forks source link

Add locale for Turkish #4

Closed karahanbuhan closed 1 year ago

karahanbuhan commented 3 years ago

Added locale for Turkish, but there is something I would like to say about this part of the test and a feature.

assert_eq!(dt.formatl("%.f", locale).to_string(), ".026490708");
assert_eq!(dt.with_nanosecond(1_026_490_000).unwrap().formatl("%.f", locale).to_string(), ".026490");
assert_eq!(dt.formatl("%.3f", locale).to_string(), ".026");
assert_eq!(dt.formatl("%.6f", locale).to_string(), ".026490");
assert_eq!(dt.formatl("%.9f", locale).to_string(), ".026490708");

Comma (0,7 instead of 0.7) is used as decimal separator in Turkish. Actually, lots of countries use decimal comma instead of point. It would be great if this feature was implemented.