blumjs
Version:
A UI Package for Angular2
29 lines (28 loc) • 636 B
JavaScript
var DateUnit = (function () {
function DateUnit() {
this.hour = 0;
this.minute = 0;
this.seconds = 0;
}
DateUnit.prototype.addMonth = function () {
if (this.month == 11) {
this.year++;
this.month = 0;
}
else {
this.month++;
}
};
DateUnit.prototype.subMonth = function () {
if (this.month == 0) {
this.year--;
this.month = 11;
}
else {
this.month--;
}
};
return DateUnit;
}());
exports.DateUnit = DateUnit;
;