forked from chronotope/chrono
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Locales and format_localized (chronotope#453)
- Loading branch information
Showing
11 changed files
with
448 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ Ben Boeckel <[email protected]> | |
Ben Eills <[email protected]> | ||
Brandon W Maister <[email protected]> | ||
Brandon W Maister <[email protected]> | ||
Cecile Tonglet <[email protected]> | ||
Colin Ray <[email protected]> | ||
Corey Farwell <[email protected]> | ||
Dan <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
} |
Oops, something went wrong.