1 | import { dateLib as defaultDateLib } from "../lib/index.js";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | export class CalendarDay {
|
10 | constructor(date, displayMonth,
|
11 | /** @ignore */
|
12 | dateLib = defaultDateLib) {
|
13 | this.date = date;
|
14 | this.displayMonth = displayMonth;
|
15 | this.outside = Boolean(displayMonth && !dateLib.isSameMonth(date, displayMonth));
|
16 | this.dateLib = dateLib;
|
17 | }
|
18 | |
19 |
|
20 |
|
21 |
|
22 | isEqualTo(day) {
|
23 | return (this.dateLib.isSameDay(day.date, this.date) &&
|
24 | this.dateLib.isSameMonth(day.displayMonth, this.displayMonth));
|
25 | }
|
26 | }
|
27 |
|
\ | No newline at end of file |