[gnome-control-center] datetime: Support new date endianess for ce_RU
- From: Mathieu Bridon <mbridon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] datetime: Support new date endianess for ce_RU
- Date: Mon, 15 Jun 2015 15:25:55 +0000 (UTC)
commit 8b2d6b7afe1d122f75523880da17d79854199dd0
Author: Mathieu Bridon <bochecha daitauha fr>
Date: Thu Jun 11 18:24:08 2015 +0200
datetime: Support new date endianess for ce_RU
https://bugzilla.gnome.org/show_bug.cgi?id=749438
panels/datetime/date-endian.c | 6 ++++++
panels/datetime/date-endian.h | 3 ++-
2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/panels/datetime/date-endian.c b/panels/datetime/date-endian.c
index 2abcb89..453c6ab 100644
--- a/panels/datetime/date-endian.c
+++ b/panels/datetime/date-endian.c
@@ -135,6 +135,10 @@ date_endian_get_default (gboolean verbose)
items[1] == ITEM_DAY &&
items[2] == ITEM_YEAR)
return DATE_ENDIANESS_MIDDLE;
+ if (items[0] == ITEM_YEAR &&
+ items[1] == ITEM_DAY &&
+ items[2] == ITEM_MONTH)
+ return DATE_ENDIANESS_YDM;
g_warning ("Could not parse format '%s'", fmt);
@@ -165,6 +169,8 @@ date_endian_to_string (DateEndianess endianess)
return "Big (YYYY-MM-DD)";
case DATE_ENDIANESS_MIDDLE:
return "Middle (MM-DD-YYYY)";
+ case DATE_ENDIANESS_YDM:
+ return "YDM (YYYY-DD-MM)";
default:
g_assert_not_reached ();
}
diff --git a/panels/datetime/date-endian.h b/panels/datetime/date-endian.h
index 5b557da..396cd34 100644
--- a/panels/datetime/date-endian.h
+++ b/panels/datetime/date-endian.h
@@ -22,7 +22,8 @@
typedef enum {
DATE_ENDIANESS_BIG, /* Big-endian (year, month, day), e.g. 03-04-05 */
DATE_ENDIANESS_LITTLE, /* Little-endian (day, month, year), e.g. 05/04/03 */
- DATE_ENDIANESS_MIDDLE /* Middle-endian (month, day, year), e.g. 04/05/03 */
+ DATE_ENDIANESS_MIDDLE, /* Middle-endian (month, day, year), e.g. 04/05/03 */
+ DATE_ENDIANESS_YDM /* YDM-endian (year, day, month), e.g. 03/05/04 */
} DateEndianess;
DateEndianess date_endian_get_default (gboolean verbose);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]