cosmetic changes
This commit is contained in:
parent
9e0497c76b
commit
464fcf6971
1 changed files with 3 additions and 3 deletions
|
@ -254,7 +254,7 @@ Ox.makeDate <f> Takes a date, number or string, returns a date
|
|||
@*/
|
||||
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)) {
|
||||
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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue