comparison app/model/Messprogramm.js @ 781:4c1101f0ba99

Serialize Date to DayOfYear when writing/saving
author Dustin Demuth <dustin@intevation.de>
date Tue, 12 May 2015 17:41:38 +0200
parents afc9076db490
children d4eb8fb99b5e
comparison
equal deleted inserted replaced
780:b3e38a2a25c7 781:4c1101f0ba99
65 if (!v) { 65 if (!v) {
66 return v; 66 return v;
67 } 67 }
68 return new Date(v); 68 return new Date(v);
69 }, 69 },
70 serialize: function(value) {
71 if (value instanceof Date && !isNaN(value.valueOf())) {
72 return value.getDOY();
73 }
74 }
70 }, { 75 }, {
71 name: 'gueltigBis', 76 name: 'gueltigBis',
72 type: 'date', 77 type: 'date',
73 convert: function(v) { 78 convert: function(v) {
74 if (!v) { 79 if (!v) {
75 return v; 80 return v;
76 } 81 }
77 return new Date(v); 82 return new Date(v);
78 }, 83 },
84 serialize: function(value) {
85 if (value instanceof Date && !isNaN(value.valueOf())) {
86 return value.getDOY();
87 }
88 }
79 }, { 89 }, {
80 name: 'probeNehmerId' 90 name: 'probeNehmerId'
81 }, { 91 }, {
82 name: 'probeKommentar' 92 name: 'probeKommentar'
83 }, { 93 }, {

http://lada.wald.intevation.org