jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f4522d4124adfaea26602d93fc03249a859b1769

commit f4522d4124adfaea26602d93fc03249a859b1769
Author: Woochan Lee <wc0917....@samsung.com>
Date:   Thu Aug 31 14:16:26 2017 +0900

    efl_ui_clock: Add 'O' character to ignore POSIX alternative format in 
format.
    
    Summary:
    _parse_format() function filtering "_/-/0/^/*" to filter POSIX 
alternatvie/extension formats,
    But the Datetime do not appear in some locale(fa_IR, lzh_TW, my_MM, or_IN) 
with 'O'.
    
    + improve code. (not compare with all of the characters. instead of that 
using strchr)
    
    https://lh.2xlibre.net/values/d_t_fmt/
    
    @fix
    
    Test Plan: Set locale as fa_IR and create DateTime. and see fields, not 
appears.
    
    Reviewers: jpeg, cedric
    
    Subscribers: cedric, jpeg
    
    Differential Revision: https://phab.enlightenment.org/D5020
---
 src/lib/elementary/efl_ui_clock.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/efl_ui_clock.c 
b/src/lib/elementary/efl_ui_clock.c
index adb904ef54..77aed3814e 100644
--- a/src/lib/elementary/efl_ui_clock.c
+++ b/src/lib/elementary/efl_ui_clock.c
@@ -66,6 +66,7 @@ static Format_Map mapping[EFL_UI_CLOCK_TYPE_COUNT] = {
 
 static const char *multifield_formats = "cxXrRTDF";
 static const char *ignore_separators = "()";
+static const char *ignore_extensions = "E0_-O^#";
 static Clock_Mod_Api *dt_mod = NULL;
 
 static const char SIG_CHANGED[] = "changed";
@@ -285,7 +286,7 @@ _parse_format(Evas_Object *obj,
      {
         if (fmt_parsing)
           {
-             if (cur == '_' || cur == '-' || cur == '0' || cur == '^' || cur 
== '#')
+             if (strchr(ignore_extensions, cur))
                {
                   fmt_ptr++;
                   continue;

-- 


Reply via email to