utils: retrieve first_weekday from locale
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=703317
This commit is contained in:
@@ -349,6 +349,17 @@ get_desc_from_component (ECalComponent *component,
|
|||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gint
|
||||||
|
get_first_weekday (void)
|
||||||
|
{
|
||||||
|
const char *const s = nl_langinfo(_NL_TIME_FIRST_WEEKDAY);
|
||||||
|
|
||||||
|
if (s && *s >= 1 && *s <= 7)
|
||||||
|
return ((int)*s) - 1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* Function to do a last minute fixup of the AM/PM stuff if the locale
|
/* Function to do a last minute fixup of the AM/PM stuff if the locale
|
||||||
* and gettext haven't done it right. Most English speaking countries
|
* and gettext haven't done it right. Most English speaking countries
|
||||||
* except the USA use the 24 hour clock (UK, Australia etc). However
|
* except the USA use the 24 hour clock (UK, Australia etc). However
|
||||||
|
|||||||
@@ -81,6 +81,8 @@ void print_date (const gchar*
|
|||||||
gchar* get_desc_from_component (ECalComponent *component,
|
gchar* get_desc_from_component (ECalComponent *component,
|
||||||
const gchar *joint_char);
|
const gchar *joint_char);
|
||||||
|
|
||||||
|
gint get_first_weekday (void);
|
||||||
|
|
||||||
/* code brought from evolution */
|
/* code brought from evolution */
|
||||||
gsize e_strftime_fix_am_pm (gchar *str,
|
gsize e_strftime_fix_am_pm (gchar *str,
|
||||||
gsize max,
|
gsize max,
|
||||||
|
|||||||
Reference in New Issue
Block a user