diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/outOfOffice.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/util/outOfOffice.js b/src/util/outOfOffice.js index 4b200739c..68c3b7432 100644 --- a/src/util/outOfOffice.js +++ b/src/util/outOfOffice.js @@ -174,7 +174,10 @@ export function buildOutOfOfficeSieveScript(sieveScript, { * @return {string} YYYY-MM-DD */ export function formatDateForSieve(date) { - return date.toISOString().slice(0, 10) + const year = date.getFullYear().toString().padStart(4, '0') + const month = (date.getMonth() + 1).toString().padStart(2, '0') + const day = date.getDate().toString().padStart(2, '0') + return `${year}-${month}-${day}` } /** |