diff options
author | Milan Crha <mcrha@redhat.com> | 2011-11-16 02:45:29 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2011-11-16 02:46:22 +0800 |
commit | badc11edcf5e73bc6148c7b5cdccee739eb9d7ae (patch) | |
tree | 6cee87b2569d85f68f6552a4510f673f2af854be /e-util | |
parent | ecf3f2a6e927a5efe8b38622ee884d4c5d88e5f3 (diff) | |
download | gsoc2013-evolution-badc11edcf5e73bc6148c7b5cdccee739eb9d7ae.tar gsoc2013-evolution-badc11edcf5e73bc6148c7b5cdccee739eb9d7ae.tar.gz gsoc2013-evolution-badc11edcf5e73bc6148c7b5cdccee739eb9d7ae.tar.bz2 gsoc2013-evolution-badc11edcf5e73bc6148c7b5cdccee739eb9d7ae.tar.lz gsoc2013-evolution-badc11edcf5e73bc6148c7b5cdccee739eb9d7ae.tar.xz gsoc2013-evolution-badc11edcf5e73bc6148c7b5cdccee739eb9d7ae.tar.zst gsoc2013-evolution-badc11edcf5e73bc6148c7b5cdccee739eb9d7ae.zip |
Bug #661126 - Meeting Free/busy dialog dates don't follow locale
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/e-datetime-format.c | 22 | ||||
-rw-r--r-- | e-util/e-datetime-format.h | 1 |
2 files changed, 23 insertions, 0 deletions
diff --git a/e-util/e-datetime-format.c b/e-util/e-datetime-format.c index c21d025794..877b170218 100644 --- a/e-util/e-datetime-format.c +++ b/e-util/e-datetime-format.c @@ -662,3 +662,25 @@ e_datetime_format_format_tm (const gchar *component, return res; } + +gboolean +e_datetime_format_includes_day_name (const gchar *component, const gchar *part, DTFormatKind kind) +{ + gchar *key; + const gchar *fmt; + gboolean res; + + g_return_val_if_fail (component != NULL, FALSE); + g_return_val_if_fail (*component != 0, FALSE); + + key = gen_key (component, part, kind); + g_return_val_if_fail (key != NULL, FALSE); + + fmt = get_format_internal (key, kind); + + res = fmt && (strstr (fmt, "%a") != NULL || strstr (fmt, "%A") != NULL); + + g_free (key); + + return res; +} diff --git a/e-util/e-datetime-format.h b/e-util/e-datetime-format.h index 2c19c65133..28eed151b3 100644 --- a/e-util/e-datetime-format.h +++ b/e-util/e-datetime-format.h @@ -39,6 +39,7 @@ void e_datetime_format_add_setup_widget (GtkWidget *table, gint row, const gchar gchar *e_datetime_format_format (const gchar *component, const gchar *part, DTFormatKind kind, time_t value); gchar *e_datetime_format_format_tm (const gchar *component, const gchar *part, DTFormatKind kind, struct tm *tm_time); +gboolean e_datetime_format_includes_day_name (const gchar *component, const gchar *part, DTFormatKind kind); G_END_DECLS |