add chron to coreVM

This commit is contained in:
marlon-erler
2026-04-16 11:56:42 +00:00
parent 75faa40797
commit cae717066a
5 changed files with 96 additions and 10 deletions
+3 -1
View File
@@ -5,6 +5,7 @@ import FileModel, { FileModelSubPath } from "./fileModel";
import SettingsModel from "../Global/settingsModel";
import StorageModel from "../Global/storageModel";
import { TaskFileContent } from "./boardsAndTasksModel";
import CoreViewModel from "../../ViewModel/Global/coreViewModel";
export default class CalendarModel {
readonly storageModel: StorageModel;
@@ -57,12 +58,13 @@ export default class CalendarModel {
};
generateMonthGrid = <T>(
coreViewModel: CoreViewModel,
year: number,
month: number,
defaultValueCreator: () => T,
): MonthGrid<T> => {
// get today
const date: Date = new Date();
const date = coreViewModel.unwrappedTodayDate;
const isCurrentMonth: boolean =
year == date.getFullYear() && month == date.getMonth() + 1;