[Lada-commits] [PATCH 3 of 3] Serialize Date to DayOfYear when writing/saving
Wald Commits
scm-commit at wald.intevation.org
Tue May 12 17:43:10 CEST 2015
# HG changeset patch
# User Dustin Demuth <dustin at intevation.de>
# Date 1431445298 -7200
# Node ID 4c1101f0ba99ea393412087f2c69be1c1b15e08a
# Parent b3e38a2a25c7c68d0d468b5f1dfd868dfd483ea8
Serialize Date to DayOfYear when writing/saving
diff -r b3e38a2a25c7 -r 4c1101f0ba99 app/model/Messprogramm.js
--- a/app/model/Messprogramm.js Tue May 12 17:30:59 2015 +0200
+++ b/app/model/Messprogramm.js Tue May 12 17:41:38 2015 +0200
@@ -67,6 +67,11 @@
}
return new Date(v);
},
+ serialize: function(value) {
+ if (value instanceof Date && !isNaN(value.valueOf())) {
+ return value.getDOY();
+ }
+ }
}, {
name: 'gueltigBis',
type: 'date',
@@ -76,6 +81,11 @@
}
return new Date(v);
},
+ serialize: function(value) {
+ if (value instanceof Date && !isNaN(value.valueOf())) {
+ return value.getDOY();
+ }
+ }
}, {
name: 'probeNehmerId'
}, {
More information about the Lada-commits
mailing list