datatype-date-math.js revision af588160cda24eb5a49cf49c51ae048cc5fdf664
/**
* Parse number submodule.
*
* @module datatype
* @submodule datatype-date-parse
* @for DataType.Date
*/
/**
* Checks whether a native JavaScript Date contains a valid value.
* @for DataType.Date
* @method isValidDate
* @param oDate {Date} Date in the month for which the number of days is desired.
* @return {Boolean} True if the date argument contains a valid value.
*/
isValidDate : function (oDate) {
return true;
}
else {
return false;
}
},
return newDate;
},
return newDate;
},
/**
* Takes a native JavaScript Date and returns the number of days in the month that the given date belongs to.
* @for DataType.Date
* @method daysInMonth
* @param oDate {Date} Date in the month for which the number of days is desired.
* @return {Number} A number (either 28, 29, 30 or 31) of days in the given month.
*/
daysInMonth : function (oDate) {
if (!this.isValidDate(oDate)) {
return 0;
}
if (mon != 1) {
}
else {
return 29;
}
return 28;
}
return 29;
}
else {
return 28;
}
}
}
});
}, '@VERSION@' );