system-time 11.1.0

A library for fetching the current time based on the system's locale settings.
Documentation
/// Abbreviated English weekday names as 3-byte ASCII arrays, indexed by weekday number.
pub(crate) const DAYS: [[u8; 3]; 7] = [
    *b"Sun", *b"Mon", *b"Tue", *b"Wed", *b"Thu", *b"Fri", *b"Sat",
];

/// Abbreviated English month names as 3-byte ASCII arrays, indexed by month number minus one.
pub(crate) const MONTHS: [[u8; 3]; 12] = [
    *b"Jan", *b"Feb", *b"Mar", *b"Apr", *b"May", *b"Jun", *b"Jul", *b"Aug", *b"Sep", *b"Oct",
    *b"Nov", *b"Dec",
];

/// Precomputed two-digit ASCII decimal pairs from `00` to `99`.
pub(crate) const DIGIT_PAIRS: &[u8; 200] = b"00010203040506070809\
10111213141516171819\
20212223242526272829\
30313233343536373839\
40414243444546474849\
50515253545556575859\
60616263646566676869\
70717273747576777879\
80818283848586878889\
90919293949596979899";

/// ASCII digit zero byte.
pub(crate) const ASCII_ZERO: u8 = b'0';

/// ASCII dash byte separating date components.
pub(crate) const DATE_DASH: u8 = b'-';

/// ASCII space byte separating date and time components.
pub(crate) const DATE_TIME_SEP: u8 = b' ';

/// ASCII colon byte separating time components.
pub(crate) const TIME_COLON: u8 = b':';

/// ASCII dot byte separating seconds and fractional seconds.
pub(crate) const TIME_DOT: u8 = b'.';

/// ASCII comma byte used in RFC 1123 GMT formatting.
pub(crate) const GMT_COMMA: u8 = b',';

/// Trailing GMT zone suffix in RFC 1123 formatted timestamps.
pub(crate) const GMT_SUFFIX: [u8; 4] = *b" GMT";

/// Number of seconds in one minute.
pub(crate) const SECONDS_PER_MINUTE: u64 = 60;

/// Number of seconds in one hour.
pub(crate) const SECONDS_PER_HOUR: u64 = 3_600;

/// Number of seconds in one day.
pub(crate) const SECONDS_PER_DAY: u64 = 86_400;

/// Number of hours in one day.
pub(crate) const HOURS_PER_DAY: u64 = 24;

/// Maximum year formatted into fixed-width 4-digit buffers.
pub(crate) const MAX_FOUR_DIGIT_YEAR: u64 = 9_999;

/// Days offset between 0000-03-01 and 1970-01-01 in Hinnant's civil calendar algorithm.
pub(crate) const HINNANT_EPOCH_OFFSET: u64 = 719_468;

/// Days in a 400-year Gregorian calendar era.
pub(crate) const DAYS_PER_ERA: u64 = 146_097;

/// Days in a 400-year Gregorian calendar era minus one.
pub(crate) const DAYS_PER_ERA_MINUS_1: u64 = 146_096;

/// Days in a 4-year cycle including one leap day.
pub(crate) const DAYS_PER_4_YEARS: u64 = 1_460;

/// Days in a 100-year cycle excluding the century leap day.
pub(crate) const DAYS_PER_100_YEARS: u64 = 36_524;

/// Days in a standard non-leap year.
pub(crate) const DAYS_PER_YEAR: u64 = 365;

/// Years in one Gregorian calendar era.
pub(crate) const YEARS_PER_ERA: u64 = 400;

/// Byte length of all supported POSIX UTF-8 locale strings.
pub(crate) const LOCALE_BYTE_LEN: usize = 11;

/// Common `.UTF-8` suffix of all supported POSIX locale strings.
pub(crate) const UTF8_LOCALE_SUFFIX: &[u8; 6] = b".UTF-8";

/// Environment variable holding the locale of the current session.
pub(crate) const LANG_ENV_VAR: &str = "LANG";

/// Human-readable name of the Arabic (Saudi Arabia) locale.
pub(crate) const LANG_AR_SA_NAME: &str = "العربية (السعودية)";

/// Human-readable name of the German (Germany) locale.
pub(crate) const LANG_DE_DE_NAME: &str = "Deutsch (Deutschland)";

/// Human-readable name of the English (United States) locale.
pub(crate) const LANG_EN_US_NAME: &str = "English (US)";

/// Human-readable name of the Spanish (Spain) locale.
pub(crate) const LANG_ES_ES_NAME: &str = "Español (España)";

/// Human-readable name of the Finnish (Finland) locale.
pub(crate) const LANG_FI_FI_NAME: &str = "Suomi (Suomi)";

/// Human-readable name of the French (France) locale.
pub(crate) const LANG_FR_FR_NAME: &str = "Français (France)";

/// Human-readable name of the Hindi (India) locale.
pub(crate) const LANG_HI_IN_NAME: &str = "हिन्दी (भारत)";

/// Human-readable name of the Italian (Italy) locale.
pub(crate) const LANG_IT_IT_NAME: &str = "Italiano (Italia)";

/// Human-readable name of the Japanese (Japan) locale.
pub(crate) const LANG_JA_JP_NAME: &str = "日本語 (日本)";

/// Human-readable name of the Korean (South Korea) locale.
pub(crate) const LANG_KO_KR_NAME: &str = "한국어 (한국)";

/// Human-readable name of the Dutch (Netherlands) locale.
pub(crate) const LANG_NL_NL_NAME: &str = "Nederlands (Nederland)";

/// Human-readable name of the Portuguese (Portugal) locale.
pub(crate) const LANG_PT_PT_NAME: &str = "Português (Portugal)";

/// Human-readable name of the Russian (Russia) locale.
pub(crate) const LANG_RU_RU_NAME: &str = "Русский (Россия)";

/// Human-readable name of the Swedish (Sweden) locale.
pub(crate) const LANG_SV_SE_NAME: &str = "Svenska (Sverige)";

/// Human-readable name of the Thai (Thailand) locale.
pub(crate) const LANG_TH_TH_NAME: &str = "ภาษาไทย (ประเทศไทย)";

/// Human-readable name of the Vietnamese (Vietnam) locale.
pub(crate) const LANG_VI_VN_NAME: &str = "Tiếng Việt (Việt Nam)";

/// Human-readable name of the Chinese (China) locale.
pub(crate) const LANG_ZH_CN_NAME: &str = "中文 (中国)";

/// POSIX locale prefix of the Arabic (Saudi Arabia) locale.
pub(crate) const LANG_AR_SA_PREFIX: &[u8; 5] = b"ar_SA";

/// POSIX locale prefix of the German (Germany) locale.
pub(crate) const LANG_DE_DE_PREFIX: &[u8; 5] = b"de_DE";

/// POSIX locale prefix of the English (United States) locale.
pub(crate) const LANG_EN_US_PREFIX: &[u8; 5] = b"en_US";

/// POSIX locale prefix of the Spanish (Spain) locale.
pub(crate) const LANG_ES_ES_PREFIX: &[u8; 5] = b"es_ES";

/// POSIX locale prefix of the Finnish (Finland) locale.
pub(crate) const LANG_FI_FI_PREFIX: &[u8; 5] = b"fi_FI";

/// POSIX locale prefix of the French (France) locale.
pub(crate) const LANG_FR_FR_PREFIX: &[u8; 5] = b"fr_FR";

/// POSIX locale prefix of the Hindi (India) locale.
pub(crate) const LANG_HI_IN_PREFIX: &[u8; 5] = b"hi_IN";

/// POSIX locale prefix of the Italian (Italy) locale.
pub(crate) const LANG_IT_IT_PREFIX: &[u8; 5] = b"it_IT";

/// POSIX locale prefix of the Japanese (Japan) locale.
pub(crate) const LANG_JA_JP_PREFIX: &[u8; 5] = b"ja_JP";

/// POSIX locale prefix of the Korean (South Korea) locale.
pub(crate) const LANG_KO_KR_PREFIX: &[u8; 5] = b"ko_KR";

/// POSIX locale prefix of the Dutch (Netherlands) locale.
pub(crate) const LANG_NL_NL_PREFIX: &[u8; 5] = b"nl_NL";

/// POSIX locale prefix of the Portuguese (Portugal) locale.
pub(crate) const LANG_PT_PT_PREFIX: &[u8; 5] = b"pt_PT";

/// POSIX locale prefix of the Russian (Russia) locale.
pub(crate) const LANG_RU_RU_PREFIX: &[u8; 5] = b"ru_RU";

/// POSIX locale prefix of the Swedish (Sweden) locale.
pub(crate) const LANG_SV_SE_PREFIX: &[u8; 5] = b"sv_SE";

/// POSIX locale prefix of the Thai (Thailand) locale.
pub(crate) const LANG_TH_TH_PREFIX: &[u8; 5] = b"th_TH";

/// POSIX locale prefix of the Vietnamese (Vietnam) locale.
pub(crate) const LANG_VI_VN_PREFIX: &[u8; 5] = b"vi_VN";

/// POSIX locale prefix of the Chinese (China) locale.
pub(crate) const LANG_ZH_CN_PREFIX: &[u8; 5] = b"zh_CN";