[elm_datetime.c] Datetime bug fix in field format parsing logic. [PLM issue: P130412...
authorsumanth <sumanth.m@samsung.com>
Tue, 16 Apr 2013 10:11:20 +0000 (15:41 +0530)
committerSungho Kwak <sungho1.kwak@samsung.com>
Wed, 12 Jun 2013 04:17:10 +0000 (13:17 +0900)
Change-Id: I197baaefaeced625c34ef4643eff6fa2997b08b1

src/lib/elm_datetime.c

index b6e68f5..0824096 100644 (file)
@@ -252,6 +252,13 @@ _parse_format(Evas_Object *obj,
      {
         if (fmt_parsing)
           {
+             /* some locales have format specifiers like %-d for Date.
+              * parse each field format as similar to LIBC snprintf() formatting */
+             if ((cur == ' ' || cur == '-'))
+               {
+                  fmt_ptr++;
+                  continue;
+               }
              fmt_parsing = EINA_FALSE;
              for (idx = 0; idx < ELM_DATETIME_TYPE_COUNT; idx++)
                {