diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2017-01-07 14:44:53 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2017-01-07 14:44:53 +0100 |
commit | e3af3fd98866bea39bc31b65e5a6bb6bb86a956e (patch) | |
tree | b7178bc0dfec6b2b6c0fed76ad035e922d79a3df | |
parent | 69f0bab2559c3bdcb44a1c39ffebfca6bac5e89b (diff) | |
download | hesla-e3af3fd98866bea39bc31b65e5a6bb6bb86a956e.tar.gz |
Fix creation of Date.toISODateString shim.
-rw-r--r-- | hesla.es | 11 | ||||
-rw-r--r-- | sworker.js | 2 |
2 files changed, 6 insertions, 7 deletions
@@ -1,15 +1,14 @@ import {ActivePage} from "activePage"; if (!Date.prototype.toISODateString) { - (function() { + Date.prototype.toISODateString = function() { function pad(n) { return n < 10 ? '0' + n : n; } - Date.prototype.toISODateString = function() { - return this.getFullYear() + '-' + pad(this.getMonth() + 1) + - '-' + pad(this.getDate()); - }; - }()); + + return this.getFullYear() + '-' + pad(this.getMonth() + 1) + + '-' + pad(this.getDate()); + }; } export class Hesla extends ActivePage { @@ -1,4 +1,4 @@ -var version = 'v38 - 2017-12-31'; +var version = 'v39 - 2017-01-07'; var toCache = [ '/', 'index.html', |