format of date-time

i'm searching to replace Y-m-d with d-m-Y.

i found that in:

views/default/input/date.php:   $vars['value'] = gmdate('Y-m-d', $vars['value']);

views/default/output/date.php:  $vars['value'] = gmdate('Y-m-d', $vars['value']);

there's the only rerefence to Y-m-d format.
it's safe to replace it or it's better to insert that strings (Y-m-d) in the /languages/* files?
D.
  • another step:

    modifying js/lib/ui.js at line 261, with:

            $.datepicker.regional['it'] = {

                clearText: 'Svuota', 

                clearStatus: '',

                closeText: 'Chiudi', 

                closeStatus: '',

                prevText: '<Prec', 

                prevStatus: '',

                nextText: 'Succ>', 

                nextStatus: '',

                currentText: 'Oggi', 

                currentStatus: '',

                monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',

                'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],

                monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',

                'Lug','Ago','Set','Ott','Nov','Dic'],

                monthStatus: '', 

                yearStatus: '',

                weekHeader: 'Sm', 

                weekStatus: '',

                dayNames: ['Domenica','Luned&#236','Marted&#236','Mercoled&#236','Gioved&#236','Venerd&#236','Sabato'],

                dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],

                dayNamesMin: ['Do','Lu','Ma','Me','Gio','Ve','Sa'],

                dayStatus: 'DD', 

                dateStatus: 'D, M d',

                dateFormat: 'dd/mm/yy', 

                firstDay: 1, 

                initStatus: '', 

                isRTL: false

            };

            $.datepicker.setDefaults($.datepicker.regional['it']);

    before "$('.elgg-input-date').datepicker({"
    sets the regional default for datepicker jquery-ui element.
    even if the date format "YYYY-MM-DD" is ISO-8601 standard, many humans intends other formats. here in italy the format recognized from people is "dd-mm-YYYY" or "dd/mm/YYYY".
    bye
  • Big thanks, one year after but with full love :)