aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-datetime-format.c
diff options
context:
space:
mode:
Diffstat (limited to 'e-util/e-datetime-format.c')
-rw-r--r--e-util/e-datetime-format.c22
1 files changed, 22 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;
+}