Mercurial > psgxs
changeset 29:e007a6364bf0
Fix an error when loading file/directory.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Mon, 01 Nov 2010 09:18:54 +0100 |
parents | 7cfcd7d5796c |
children | b2faacfefb90 |
files | backends/directory.js backends/file.js iso8601.js |
diffstat | 3 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/backends/directory.js +++ b/backends/directory.js @@ -18,6 +18,7 @@ */ var fs = require('fs'); +var Node = require('../nodes').Node; var backend = exports; backend.save = function(dir) {
--- a/backends/file.js +++ b/backends/file.js @@ -18,6 +18,7 @@ */ var fs = require('fs'); +var Node = require('../nodes').Node; var backend = exports; backend.save = function(file) {
--- a/iso8601.js +++ b/iso8601.js @@ -18,11 +18,11 @@ */ Date.prototype.setFromISO8601 = function(iso){ - var format = /(\d\{4\})(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)Z/; + var format = /(\d{4})(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)Z/; var m = iso.match(format); this.setUTCDate(1); - this.setUTCFullYear(parseInt(m[1],10)); + this.setUTCFullYear(parseInt(m[1])); this.setUTCMonth(parseInt(m[3],10) - 1); this.setUTCDate(parseInt(m[5],10)); this.setUTCHours(parseInt(m[7],10));