cosmetic changes

This commit is contained in:
rolux 2014-02-18 17:31:23 +05:30
parent 9e0497c76b
commit 464fcf6971

View file

@ -253,8 +253,8 @@ Ox.makeDate <f> Takes a date, number or string, returns a date
'1970-05'
@*/
Ox.makeDate = function(date) {
//Safari 4/5 does not parse YYYY, YYYY-MM or YYYY-MM-DD as date
if ($.browser.safari && $.browser.version <= '534.59.10' && Ox.isString(date)) {
// Safari 4/5 does not parse YYYY, YYYY-MM or YYYY-MM-DD as date
if (Ox.isString(date) && $.browser.safari && $.browser.version <= '534.59.10') {
if (/^\d{4}$/.test(date)) {
date += '-01-01';
} else if (/^\d{4}-\d{2}$/.test(date)) {
@ -264,7 +264,7 @@ Ox.makeDate = function(date) {
}
date = date.replace(/-/g, '/');
}
// if date is a date, new Date(date) makes a clone
// If date is a date, new Date(date) makes a clone
return Ox.isUndefined(date) ? new Date() : new Date(date);
};