woltlab-compiler
Version:
A compiler for WoltLab-Package Archives and WoltLab-Package Components
109 lines • 2.51 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Represents a time-period.
*/
class TimePeriod {
/**
* Initializes a new instance of the `TimePeriod` class.
*
* @param minute
* The minute of the period.
*
* @param hour
* The hour of the period.
*
* @param dayOfMonth
* The day of the month of the period.
*
* @param month
* The month of the period.
*
* @param dayOfWeek
* The day of the week of the period.
*/
constructor(minute, hour, dayOfMonth, month, dayOfWeek) {
this.Minute = minute;
this.Hour = hour;
this.DayOfMonth = dayOfMonth;
this.Month = month;
this.DayOfWeek = dayOfWeek;
}
/**
* Gets a yearly period.
*/
static get Yearly() {
return new TimePeriod("0", "0", "1", "Jan", "*");
}
/**
* Gets a monthly period.
*/
static get Monthly() {
return new TimePeriod("0", "0", "1", "*", "*");
}
/**
* Gets a weekly period.
*/
static get Weekly() {
return new TimePeriod("0", "0", "*", "*", "Mon");
}
/**
* Gets a daily period.
*/
static get Daily() {
return new TimePeriod("0", "0", "*", "*", "*");
}
/**
* Gets an hourly period.
*/
static get Hourly() {
return new TimePeriod("0", "*", "*", "*", "*");
}
/**
* Gets or sets the minute of the period.
*/
get Minute() {
return this.minute;
}
set Minute(value) {
this.minute = value;
}
/**
* Gets or sets the hour of the period.
*/
get Hour() {
return this.hour;
}
set Hour(value) {
this.hour = value;
}
/**
* Gets or sets the day of the month of the period.
*/
get DayOfMonth() {
return this.dayOfMonth;
}
set DayOfMonth(value) {
this.dayOfMonth = value;
}
/**
* Gets or sets the month of the period.
*/
get Month() {
return this.month;
}
set Month(value) {
this.month = value;
}
/**
* Gets or sets the day of the week of the period.
*/
get DayOfWeek() {
return this.dayOfWeek;
}
set DayOfWeek(value) {
this.dayOfWeek = value;
}
}
exports.TimePeriod = TimePeriod;
//# sourceMappingURL=TimePeriod.js.map