|
Blender V5.3
|
Classes | |
| struct | LocalePatterns |
Enumerations | |
| enum class | DateFormat : uint8_t { Default = 0 , LE_Slash = 1 , LE_Dot = 2 , LE_Dash = 3 , ME_Slash = 4 , BE_Slash = 5 , BE_Dot = 6 , BE_Dash = 7 } |
| enum class | TimeFormat : uint8_t { H24 = 0 , H12 = 1 } |
Functions | |
| std::tm | localtime_safe (time_t time) |
| std::string | date (const std::tm &date_time, StringRef locale_iso={}, DateFormat format=DateFormat::Default) |
| std::string | time (const std::tm &date_time, TimeFormat format=TimeFormat::H24) |
| std::string | datetime (const std::tm &date_time, StringRef locale_iso={}, DateFormat date_format=DateFormat::Default, TimeFormat time_format=TimeFormat::H24, const std::tm *now=nullptr, StringRef today={}, StringRef yesterday={}) |
| static const LocalePatterns & | get_locale_patterns (const StringRef locale_iso) |
|
strong |
| Enumerator | |
|---|---|
| Default | Convention based on output language. |
| LE_Slash | dd/mm/yyyy. |
| LE_Dot | dd.mm.yyyy. |
| LE_Dash | dd-mm-yyyy. |
| ME_Slash | mm/dd/yyyy. |
| BE_Slash | yyyy/mm/dd. |
| BE_Dot | yyyy.mm.dd. |
| BE_Dash | yyyy-mm-dd. |
Definition at line 21 of file BLT_date_string.hh.
|
strong |
| Enumerator | |
|---|---|
| H24 | 23:59 |
| H12 | 11:59 PM |
Definition at line 40 of file BLT_date_string.hh.
| std::string blender::date_string::date | ( | const std::tm & | date_time, |
| StringRef | locale_iso = {}, | ||
| DateFormat | format = DateFormat::Default ) |
Definition at line 84 of file date_string.cc.
References BE_Dash, BE_Dot, BE_Slash, blender::BLI_assert(), BLT_I18NCONTEXT_TIME, CTX_IFACE_, CTX_N_, date(), blender::date_string::LocalePatterns::date, Default, get_locale_patterns(), LE_Dash, LE_Dot, LE_Slash, and ME_Slash.
Referenced by date(), datetime(), blender::file_attribute_columns_widths(), and blender::filelist_get_details_column_string().
| std::string blender::date_string::datetime | ( | const std::tm & | date_time, |
| StringRef | locale_iso = {}, | ||
| DateFormat | date_format = DateFormat::Default, | ||
| TimeFormat | time_format = TimeFormat::H24, | ||
| const std::tm * | now = nullptr, | ||
| StringRef | today = {}, | ||
| StringRef | yesterday = {} ) |
Definition at line 139 of file date_string.cc.
References date(), datetime(), blender::blender::StringRefBase::is_empty(), and time().
Referenced by datetime(), blender::file_attribute_columns_widths(), blender::file_draw_tooltip_custom_func(), blender::filelist_get_details_column_string(), blender::ui::template_recent_files_tooltip_func(), and blender::wm_open_mainfile_get_description().
|
static |
Definition at line 27 of file date_string.cc.
References get_locale_patterns().
Referenced by date(), and get_locale_patterns().
| std::tm blender::date_string::localtime_safe | ( | time_t | time | ) |
Definition at line 51 of file date_string.cc.
References localtime_safe(), and time().
Referenced by blender::file_draw_tooltip_custom_func(), blender::filelist_get_details_column_string(), localtime_safe(), blender::ui::template_recent_files_tooltip_func(), and blender::wm_open_mainfile_get_description().
| std::string blender::date_string::time | ( | const std::tm & | date_time, |
| TimeFormat | format = TimeFormat::H24 ) |
Definition at line 63 of file date_string.cc.
References BLT_I18NCONTEXT_TIME, CTX_IFACE_, H12, H24, and time().
Referenced by datetime(), localtime_safe(), and time().