From d18176fa715c2831467b3e3947770af2a121cb89 Mon Sep 17 00:00:00 2001 From: c43721 <55610086+c43721@users.noreply.github.com> Date: Tue, 12 Jul 2022 01:31:59 +0000 Subject: [PATCH] fix: the day has come --- package.json | 1 - protocols/openttd.js | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 8deae45..59747c6 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,6 @@ "dependencies": { "cheerio": "^1.0.0-rc.10", "compressjs": "^1.0.2", - "date-fns": "^2.28.0", "gbxremote": "^0.2.1", "got": "^12.0.3", "iconv-lite": "^0.6.3", diff --git a/protocols/openttd.js b/protocols/openttd.js index 54177ce..54d7ec5 100644 --- a/protocols/openttd.js +++ b/protocols/openttd.js @@ -1,5 +1,4 @@ -const { format } = require('date-fns'), - Core = require('./core'); +const Core = require('./core'); class OpenTtd extends Core { async run(state) { @@ -116,7 +115,7 @@ class OpenTtd extends Core { const temp = new Date(0,0,1); temp.setFullYear(0); temp.setDate(daysSinceZero+1); - return format(temp, 'YYYY-MM-DD'); + return date.toISOString().split('T')[0]; } decode(num,arr) {