diff backends/file.js @ 28:7cfcd7d5796c

Replace Paul Sowden’s ISO8601 functions by my own, since their licence is possibly incompatible with AGPL.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Mon, 01 Nov 2010 03:01:40 +0100
parents a36a514e8be8
children e007a6364bf0
line wrap: on
line diff
--- a/backends/file.js
+++ b/backends/file.js
@@ -24,7 +24,7 @@ backend.save = function(file) {
 	function sanitize(o) {
 		var n = {};
 		for (var i in o) {
-			if (i == 'content' || o[i].setISO8601)
+			if (i == 'content' || o[i].setFromISO8601)
 				n[i] = o[i].toString();
 			else if (o[i] instanceof Array)
 				n[i] = o[i];
@@ -66,7 +66,7 @@ backend.load = function(file) {
 				parseStanza(o, i);
 			else if (typeof o[i] == 'string' && regexp(o[i])) {
 				var today = new Date();
-				today.setISO8601(o[i]);
+				today.setFromISO8601(o[i]);
 				o[i] = today;
 			} else if (typeof o[i] == 'object')
 				endParsing(o[i]);