From b3a34d487c8c3724752b522fd352c96ba0bcf1a4 Mon Sep 17 00:00:00 2001 From: Michael Terry Date: Wed, 23 Feb 2011 14:07:19 -0500 Subject: add week-start controls and settings --- src/utils.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/utils.c') diff --git a/src/utils.c b/src/utils.c index f73ed14..89c499b 100644 --- a/src/utils.c +++ b/src/utils.c @@ -50,6 +50,17 @@ is_locale_12h (void) return TRUE; } +/* Check the system locale setting to see if the week starts on Sunday or Monday */ +gboolean +is_locale_week_start_sunday (void) +{ + const char * week_1stday = nl_langinfo (_NL_TIME_WEEK_1STDAY); + + /* This appears to be a special value that libc uses for Sunday, it's not + really a string */ + return (GPOINTER_TO_INT (week_1stday) == 19971130); +} + void split_settings_location (const gchar * location, gchar ** zone, gchar ** name) { -- cgit v1.2.3