diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2015-10-12 01:57:19 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2015-10-12 01:57:19 +0200 |
commit | 97d2fd80e0732382bc1bf8e9e7ee2733719025ef (patch) | |
tree | c9f70f560a58f2c7fdc8da43dece2aafb8583665 /hesla.es | |
parent | a9ff501181fb3d3b7050761aeb83fe03ecf5e60e (diff) | |
download | hesla-97d2fd80e0732382bc1bf8e9e7ee2733719025ef.tar.gz |
Use local date instead of GMT for determining current date.
Fixes #7
Diffstat (limited to 'hesla.es')
-rw-r--r-- | hesla.es | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -2,10 +2,13 @@ import {ActivePage} from "activePage"; if (!Date.prototype.toISODateString) { (function() { + function pad(n) { + return n < 10 ? '0' + n : n; + } Date.prototype.toISODateString = function() { - return this.toISOString().split('T')[0]; + return this.getFullYear() + '-' + pad(this.getMonth() + 1) + + '-' + pad(this.getDate()); }; - }()); } |