1
0
Fork 0
forked from 0x2620/oxjs
This commit is contained in:
j 2012-05-25 16:28:05 +00:00
commit eb9cd1e397
9 changed files with 34 additions and 9 deletions

View file

@ -38,7 +38,7 @@ Ox.formatDate <f> Formats a date according to a format string
date <d|n|s> date
utc <b> date is utc
<script>
Ox.test.date = new Date('2005-01-02 00:03:04');
Ox.test.date = new Date('2005/01/02 00:03:04');
</script>
> Ox.formatDate(Ox.test.date, '%A') // Full weekday
'Sunday'
@ -253,7 +253,7 @@ Ox.formatDate <f> Formats a date according to a format string
return Ox.getFullYear(date, utc).toString().slice(-2);
}],
['Z', function(date) {
return date.toString().split('(')[1].replace(')', '');
return (date.toString().split('(')[1] || '').replace(')', '');
}],
['z', function(date) {
return Ox.getTimezoneOffsetString(date);