From 59c7e47f497f7ddbb9e946f187519d8d77d33e66 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Wed, 1 Feb 2023 15:05:51 +0100 Subject: [PATCH] Fix date --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 0fc35f6..8f31c66 100644 --- a/src/index.ts +++ b/src/index.ts @@ -92,7 +92,8 @@ export class Main { } console.log("Building post...") - await new Postbuilder(action, this._config, poster, changesets).buildMessage(today.getUTCFullYear() + "-" + Utils.TwoDigits(today.getUTCMonth() + 1) + "-" + Utils.TwoDigits(today.getUTCDate() - 1)) + const yesterday = new Date(today.getTime() - 24 * 60 * 60 * 1000) + await new Postbuilder(action, this._config, poster, changesets).buildMessage(yesterday.getUTCFullYear() + "-" + Utils.TwoDigits(yesterday.getUTCMonth() + 1) + "-" + Utils.TwoDigits(yesterday.getUTCDate())) }