Added Calendar class
This commit is contained in:
parent
32db96c9ad
commit
7a49157fef
22
src/Calendar/index.ts
Normal file
22
src/Calendar/index.ts
Normal file
@ -0,0 +1,22 @@
|
||||
import Config from "../Config/Config";
|
||||
import Events from "../Events/";
|
||||
import EventGrouping from "../EventGrouping";
|
||||
|
||||
export default class Calendar {
|
||||
private readonly jsonContent: object;
|
||||
public config: Config;
|
||||
public events: Events;
|
||||
public eventGrouping: EventGrouping;
|
||||
|
||||
constructor(json) {
|
||||
this.jsonContent = json;
|
||||
this.config = new Config({
|
||||
scale: json["scale"].charAt(0),
|
||||
});
|
||||
this.events = new Events(json["events"]);
|
||||
this.eventGrouping = new EventGrouping(
|
||||
this.events.sortedEvents,
|
||||
this.config.scale
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user