Big Update
This commit is contained in:
24
classes/parsers/SchoolYear.js
Normal file
24
classes/parsers/SchoolYear.js
Normal file
@@ -0,0 +1,24 @@
|
||||
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
|
||||
Reference in New Issue
Block a user