From 8e3dc5bfad4c350be0767662ededcae8f63d0a5a Mon Sep 17 00:00:00 2001 From: sunny00217wm Date: Wed, 9 Feb 2022 11:13:19 +0800 Subject: [PATCH] No longer needed --- src/date.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/date.ts b/src/date.ts index 7b4e93a..713c8d7 100644 --- a/src/date.ts +++ b/src/date.ts @@ -378,18 +378,6 @@ export default function (bot: mwn) { } } - // Tweak set* methods (setHours, setUTCMinutes, etc) so that they - // return the modified XDate object rather than the seconds-since-epoch - // representation which is what JS Date() gives - (<(keyof startWith<'set', XDate>)[]>Object.getOwnPropertyNames(Date.prototype)) - .filter((f) => typeof f === 'string' && f.startsWith('set')) - .forEach((func) => { - let proxy = XDate.prototype[func]; - XDate.prototype[func] = function (...args: Parameters) { - return proxy.call(this, ...args); - }; - }); - return XDate as MwnDateStatic; }