32 lines
566 B
JavaScript
32 lines
566 B
JavaScript
|
class Month {
|
||
|
constructor(year, monthOffsetNormalized) {
|
||
|
this.year = year;
|
||
|
this.normalizedOffset = monthOffsetNormalized;
|
||
|
}
|
||
|
|
||
|
init() {
|
||
|
this.firstDay = (new Date(this.year, month - 1)).getDay();
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
draw(render) {
|
||
|
this.clearRender(render);
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
clearRender(render) {
|
||
|
let renderElement = document.getElementById(render);
|
||
|
renderElement.innerHTML = "";
|
||
|
}
|
||
|
|
||
|
createDay() {
|
||
|
|
||
|
}
|
||
|
|
||
|
countDays() {
|
||
|
return 32 - new Date(this.year, this.normalizedOffset - 1, 32).getDate();
|
||
|
}
|
||
|
}
|