aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2017-01-07 14:44:53 +0100
committerMatěj Cepl <mcepl@cepl.eu>2017-01-07 14:44:53 +0100
commite3af3fd98866bea39bc31b65e5a6bb6bb86a956e (patch)
treeb7178bc0dfec6b2b6c0fed76ad035e922d79a3df
parent69f0bab2559c3bdcb44a1c39ffebfca6bac5e89b (diff)
downloadhesla-e3af3fd98866bea39bc31b65e5a6bb6bb86a956e.tar.gz
Fix creation of Date.toISODateString shim.
-rw-r--r--hesla.es11
-rw-r--r--sworker.js2
2 files changed, 6 insertions, 7 deletions
diff --git a/hesla.es b/hesla.es
index 6545537..5db02e6 100644
--- a/hesla.es
+++ b/hesla.es
@@ -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 {
diff --git a/sworker.js b/sworker.js
index 4d84107..7b64985 100644
--- a/sworker.js
+++ b/sworker.js
@@ -1,4 +1,4 @@
-var version = 'v38 - 2017-12-31';
+var version = 'v39 - 2017-01-07';
var toCache = [
'/',
'index.html',