Skip to content

EU/US date/time format #56

@vladsavchuk

Description

@vladsavchuk

Currently, to switch to EU date format you need to modify the code in 3 places. Some better one-place setting would be nice.

  1. /template/common/calendar.html, line 5:
        $('.date').datepicker({format: 'dd/mm/yyyy'});
  1. /php/fw/DateUtils.php, lines 8-12
    public static $DATE_FORMAT=0;  
    public static $DATE_FORMAT_STR='DD/MM/YYYY';
    public static $TIME_FORMAT=0;
    public static $TIME_FORMAT_STR='HH:MM';
  1. /php/fw/parsepage.php, line 924, function sec2date. Change "d" and "m" order in the switch block:
  switch (strtolower($format)) {
    case '':
      $format = 'd/m/Y';
      break;
    case 'short':
      $format = 'd/m/Y H:i';
      break;
    case 'long':
      $format = 'd/m/Y H:i:s';
      break;
    case 'sql':
      $format = 'Y-m-d H:i:s';
      break;
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions