[DEV-5546] Update to use setUTCDate
parent
3372e433d7
commit
716f2b1a32
|
@ -274,7 +274,7 @@ exports.relativeDate = function( data, value )
|
||||||
|
|
||||||
// days
|
// days
|
||||||
case 'd':
|
case 'd':
|
||||||
date_new.setDate( date_new.getUTCDate() + +tval );
|
date_new.setUTCDate( date_new.getUTCDate() + +tval );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// seconds
|
// seconds
|
||||||
|
@ -291,7 +291,7 @@ exports.relativeDate = function( data, value )
|
||||||
// and not the first day of the next
|
// and not the first day of the next
|
||||||
if( type === 'm' && date_new.getUTCDate() !== now_day )
|
if( type === 'm' && date_new.getUTCDate() !== now_day )
|
||||||
{
|
{
|
||||||
date_new.setDate(0);
|
date_new.setUTCDate(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// return in the YYYY-MM-DD format, since that's what our fields are
|
// return in the YYYY-MM-DD format, since that's what our fields are
|
||||||
|
|
Loading…
Reference in New Issue