Tell me your secrets.

This commit is contained in:
Nicolas Stepien 2011-05-20 21:33:18 +02:00
parent 171d0f1974
commit d4a8a8dcf9
2 changed files with 2 additions and 2 deletions

View File

@ -1654,7 +1654,7 @@
meridiem = '';
if ($.config('Localized am/pm')) {
meridiem = hour < 12 ? ' a.m.' : ' p.m.';
hour = hour === 0 ? 12 : hour > 12 ? hour - 12 : void 0;
hour = hour % 12 || 12;
}
date = new Date(year, month, day, hour);
year = date.getFullYear() - 2000;

View File

@ -1333,7 +1333,7 @@ localize =
meridiem = ''
if $.config 'Localized am/pm'
meridiem = if hour < 12 then ' a.m.' else ' p.m.'
hour = if hour is 0 then 12 else if hour > 12 then hour - 12
hour = hour % 12 or 12
date = new Date year, month, day, hour
year = date.getFullYear() - 2000
month = $.zeroPad date.getMonth() + 1