diff --git a/src/grist/service.ts b/src/grist/service.ts index 3f3d5c1..00b8945 100644 --- a/src/grist/service.ts +++ b/src/grist/service.ts @@ -39,11 +39,11 @@ export class GristService extends BaseService { private getTodayAsId() { const now = DateTime.now().setZone("Europe/Berlin"); const start = DateTime.fromObject( - { year: now.year, month: 0, day: 0, hour: 0, minute: 0 }, + { year: now.year, month: 1, day: 1, hour: 0, minute: 0 }, { zone: "Europe/Berlin" }, ); - const diff = start.diff(now).toMillis(); - return Math.floor(diff / 86400000); + const diff = now.diff(start).toMillis(); + return Math.ceil(diff / 86400000); } private transformToPersonalGoals(