24 lines
451 B
JavaScript
24 lines
451 B
JavaScript
const ParseTools = require("./ParseTools");
|
|
|
|
class SchoolYear {
|
|
#data;
|
|
|
|
constructor(data) {
|
|
this.#data = data;
|
|
|
|
this.id = data.ID;
|
|
this.title = data.SJ;
|
|
this.from = ParseTools.parseDateTime(this.rawFrom);
|
|
this.to = ParseTools.parseDateTime(this.rawTo);
|
|
}
|
|
|
|
get rawFrom() {
|
|
return this.#data.von;
|
|
}
|
|
|
|
get rawTo() {
|
|
return this.#data.bis;
|
|
}
|
|
}
|
|
|
|
module.exports = SchoolYear |