Ticket #12868: fr-formats.diff

File fr-formats.diff, 1.5 KB (added by stephaner, 5 years ago)

Updated to include fr_CH date inputs (diff)

  • formats.py

     
    77DATETIME_FORMAT = 'j F Y H:i:s'
    88YEAR_MONTH_FORMAT = 'F Y'
    99MONTH_DAY_FORMAT = 'j F'
    10 SHORT_DATE_FORMAT = 'j M Y'
    11 SHORT_DATETIME_FORMAT = 'j M Y H:i:s'
    12 # FIRST_DAY_OF_WEEK =
    13 # DATE_INPUT_FORMATS =
    14 # TIME_INPUT_FORMATS =
    15 # DATETIME_INPUT_FORMATS =
     10SHORT_DATE_FORMAT = 'j N Y'
     11SHORT_DATETIME_FORMAT = 'j N Y H:i:s'
     12FIRST_DAY_OF_WEEK = 1 # Monday
     13DATE_INPUT_FORMATS = (
     14    '%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
     15    '%d.%m.%Y', '%d.%m.%y', # Swiss (fr_CH), '25.10.2006', '25.10.06'
     16    '%Y-%m-%d', '%y-%m-%d', # '2006-10-25', '06-10-25'
     17    '%d %B %Y', '%d %b %Y', # '25 octobre 2006', '25 oct. 2006'
     18)
     19TIME_INPUT_FORMATS = (
     20    '%H:%M:%S', # '14:30:59'
     21    '%H:%M',    # '14:30'
     22)
     23DATETIME_INPUT_FORMATS = (
     24    '%d/%m/%Y %H:%M:%S',    # '25/10/2006 14:30:59'
     25    '%d/%m/%Y %H:%M',       # '25/10/2006 14:30'
     26    '%d/%m/%Y',             # '25/10/2006'
     27    '%d.%m.%Y %H:%M:%S',    # Swiss (fr_CH), '25.10.2006 14:30:59'
     28    '%d.%m.%Y %H:%M',       # Swiss (fr_CH), '25.10.2006 14:30'
     29    '%d.%m.%Y',             # Swiss (fr_CH), '25.10.2006'
     30    '%Y-%m-%d %H:%M:%S',    # '2006-10-25 14:30:59'
     31    '%Y-%m-%d %H:%M',       # '2006-10-25 14:30'
     32    '%Y-%m-%d',             # '2006-10-25'
     33)
    1634DECIMAL_SEPARATOR = ','
    1735THOUSAND_SEPARATOR = ' '
    18 # NUMBER_GROUPING =
     36NUMBER_GROUPING = 3
Back to Top