aboutsummaryrefslogtreecommitdiffstats
path: root/hesla.es
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2015-10-12 01:57:19 +0200
committerMatěj Cepl <mcepl@cepl.eu>2015-10-12 01:57:19 +0200
commit97d2fd80e0732382bc1bf8e9e7ee2733719025ef (patch)
treec9f70f560a58f2c7fdc8da43dece2aafb8583665 /hesla.es
parenta9ff501181fb3d3b7050761aeb83fe03ecf5e60e (diff)
downloadhesla-97d2fd80e0732382bc1bf8e9e7ee2733719025ef.tar.gz
Use local date instead of GMT for determining current date.
Fixes #7
Diffstat (limited to 'hesla.es')
-rw-r--r--hesla.es7
1 files changed, 5 insertions, 2 deletions
diff --git a/hesla.es b/hesla.es
index ccd51b4..8f94bbf 100644
--- a/hesla.es
+++ b/hesla.es
@@ -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());
};
-
}());
}