We get malformed dates with current Catalan timedef files. 1. date_fmt should be "%A, %e %B de %Y, %X %Z", and not "%A, %e de %B de %Y, %X %Z". 2. "Long month names (without case ending)" it should not be equal to "Long month names (as in a date)". "Long month names (without case ending)" is used with %E* %O* (see man strftime). ------------ Desired output after modifying /usr/src/share/timedef/ca_IT.UTF-8.src (also applicable to ca_IT.ISO8859-15.src) # cd /usr/src/share/timedef && make && make install # python3.6 Python 3.6.4 (default, Jan 2 2018, 01:25:35) [GCC 4.2.1 Compatible FreeBSD Clang 4.0.0 (tags/RELEASE_400/final 297347)] on freebsd11 Type "help", "copyright", "credits" or "license" for more information. >>> from time import gmtime, strftime, mktime >>> import locale >>> locale.setlocale(locale.LC_TIME, "ca_ES.UTF-8") 'ca_ES.UTF-8' >>> strftime("%A, %d %B del %Y a les %H:%M:%S") 'dimarts, 13 de febrer del 2018 a les 15:21:12' >>> strftime("%OB") 'febrer' >>> strftime("%B") 'de febrer' >>> # LANG=ca_ES.UTF-8 date dimarts, 13 de febrer de 2018, 15:33:20 CET # cat /usr/src/share/timedef/ca_IT.UTF-8.src # Warning: Do not edit. This file is automatically generated from the # tools in /usr/src/tools/tools/locale. The data is obtained from the # CLDR project, obtained from http://cldr.unicode.org/ # ----------------------------------------------------------------------------- # # Short month names gen. febr. març abr. maig juny jul. ag. set. oct. nov. des. # # Long month names (as in a date) de gener de febrer de març d’abril de maig de juny de juliol d’agost de setembre d’octubre de novembre de desembre # # Short weekday names dg. dl. dt. dc. dj. dv. ds. # # Long weekday names diumenge dilluns dimarts dimecres dijous divendres dissabte # # X_fmt %H:%M:%S # # x_fmt %d/%m/%Y # # c_fmt %a %e %b %X %Y # # AM/PM a. m. p. m. # # date_fmt %A, %e %B de %Y, %X %Z # # Long month names (without case ending) gener febrer març abril maig juny juliol agost setembre octubre novembre desembre # # md_order dm # # ampm_fmt %I:%M:%S %p # EOF
Created attachment 190742 [details] Timedef settings for Catalan
I'm not sure if we should use GNU extensions (%-*) in format strings. Robert, would it be correct to use the format strings and months names from pre-CLDR versions of the data: https://svnweb.freebsd.org/base/head/share/timedef/ca_ES.ISO8859-1.src?revision=174990&view=markup&pathrev=289260 https://svnweb.freebsd.org/base/head/share/timedef/ca_ES.UTF-8.src?revision=174990&view=markup&pathrev=289260
And, if possible, please submit a change request for the CLDR data: http://cldr.unicode.org/index/bug-reports.
(In reply to Yuri Pankov from comment #3) CLDR is up to date http://st.unicode.org/cldr-apps/v#/ca/Gregorian/9aa3b64aaf1346b
(In reply to Yuri Pankov from comment #2) No. The date format improvements for Catalan are already collected in last CLDR, the genitive form of a month name in a date is obligatory in Catalan (e.g. 1 de gener de 2019) and word sequences such as d'abril, d'agost i d'octubre are shortened (e.g. 28 d'octubre de 2019). Other changes: short month names, short day names, am/pm, (example: fedora 28+gnome+glibc) Correct date formats in Czech, Catalan, Greek, and Lithuanian http://lingonborough.com/fedora-28-updates-for-czech-catalan-greek-and-lithuanian-users/
Thanks for the pointers. I have created review D17737 updating timedef for Catalan from latest CLDR data (34.0). Could you please take a look at it to make sure it's correct?
1. You should remove leading zeros in day and month numbers; change %e with %-e; %d with %-d; %m with %-m: # c_fmt %A, %-e %B de %Y a les %H:%M:%S # date_fmt (EEEE, d MMMM 'de' y 'a' 'les' H:mm:ss zzzz) %A, %-e %B de %Y a les %H:%M:%S %Z # x_fmt (d/M/yy) %-d/%-m/%y 2. You should change Long month names (without case ending) which are not equal to Long month names (as in a date): # Long month names (without case ending) gener febrer març abril maig juny juliol agost setembre octubre novembre desembre
(In reply to Yuri Pankov from comment #6) 1. You should remove leading zeros in day and month numbers; change %e with %-e; %d with %-d; %m with %-m: # c_fmt %A, %-e %B de %Y a les %H:%M:%S # date_fmt (EEEE, d MMMM 'de' y 'a' 'les' H:mm:ss zzzz) %A, %-e %B de %Y a les %H:%M:%S %Z # x_fmt (d/M/yy) %-d/%-m/%y 2. You should change Long month names (without case ending) which are not equal to Long month names (as in a date): # Long month names (without case ending) gener febrer març abril maig juny juliol agost setembre octubre novembre desembre