summaryrefslogtreecommitdiffstats
path: root/third_party/rust/chrono/src/format/locales.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/chrono/src/format/locales.rs')
-rw-r--r--third_party/rust/chrono/src/format/locales.rs33
1 files changed, 33 insertions, 0 deletions
diff --git a/third_party/rust/chrono/src/format/locales.rs b/third_party/rust/chrono/src/format/locales.rs
new file mode 100644
index 0000000000..f7b4bbde5b
--- /dev/null
+++ b/third_party/rust/chrono/src/format/locales.rs
@@ -0,0 +1,33 @@
+use pure_rust_locales::{locale_match, Locale};
+
+pub(crate) fn short_months(locale: Locale) -> &'static [&'static str] {
+ locale_match!(locale => LC_TIME::ABMON)
+}
+
+pub(crate) fn long_months(locale: Locale) -> &'static [&'static str] {
+ locale_match!(locale => LC_TIME::MON)
+}
+
+pub(crate) fn short_weekdays(locale: Locale) -> &'static [&'static str] {
+ locale_match!(locale => LC_TIME::ABDAY)
+}
+
+pub(crate) fn long_weekdays(locale: Locale) -> &'static [&'static str] {
+ locale_match!(locale => LC_TIME::DAY)
+}
+
+pub(crate) fn am_pm(locale: Locale) -> &'static [&'static str] {
+ locale_match!(locale => LC_TIME::AM_PM)
+}
+
+pub(crate) fn d_fmt(locale: Locale) -> &'static str {
+ locale_match!(locale => LC_TIME::D_FMT)
+}
+
+pub(crate) fn d_t_fmt(locale: Locale) -> &'static str {
+ locale_match!(locale => LC_TIME::D_T_FMT)
+}
+
+pub(crate) fn t_fmt(locale: Locale) -> &'static str {
+ locale_match!(locale => LC_TIME::T_FMT)
+}