Permalink
Browse files

Override Date.parse if it doesn't parse iso8859

  • Loading branch information...
1 parent cc91c44 commit 010f46088069503823fe9aa3df33d3fc9bdc0d47 @peritus peritus committed with isaacs Jul 31, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 registry/app.js
View
@@ -51,6 +51,8 @@ ddoc.shows.requirey = function () {
+ pad(d.getUTCSeconds())+'Z'}
if (!Date.prototype.toISOString) {
Date.prototype.toISOString = function () { return ISODateString(this) }
+ }
+ if (isNaN(Date.parse("2010-12-29T07:31:06Z"))) {
Date.parse = function (s) {
// s is something like "2010-12-29T07:31:06Z"
s = s.split("T")
@@ -288,6 +290,8 @@ ddoc.lists.index = function (head, req) {
+ pad(d.getUTCSeconds())+'Z'}
if (!Date.prototype.toISOString) {
Date.prototype.toISOString = function () { return ISODateString(this) }
+ }
+ if (isNaN(Date.parse("2010-12-29T07:31:06Z"))) {
Date.parse = function (s) {
// s is something like "2010-12-29T07:31:06Z"
s = s.split("T")
@@ -816,6 +820,8 @@ ddoc.shows.package = function (doc, req) {
+ pad(d.getUTCMinutes())+':'
+ pad(d.getUTCSeconds())+'Z'}
Date.prototype.toISOString = function () { return ISODateString(this) }
+ }
+ if (isNaN(Date.parse("2010-12-29T07:31:06Z"))) {
Date.parse = function (s) {
// s is something like "2010-12-29T07:31:06Z"
s = s.split("T")
@@ -958,6 +964,8 @@ ddoc.updates.package = function (doc, req) {
+ pad(d.getUTCSeconds())+'Z'}
if (!Date.prototype.toISOString) {
Date.prototype.toISOString = function () { return ISODateString(this) }
+ }
+ if (isNaN(Date.parse("2010-12-29T07:31:06Z"))) {
Date.parse = function (s) {
// s is something like "2010-12-29T07:31:06Z"
s = s.split("T")
@@ -1120,6 +1128,8 @@ ddoc.validate_doc_update = function (newDoc, oldDoc, user) {
+ pad(d.getUTCSeconds())+'Z'}
if (!Date.prototype.toISOString) {
Date.prototype.toISOString = function () { return ISODateString(this) }
+ }
+ if (isNaN(Date.parse("2010-12-29T07:31:06Z"))) {
Date.parse = function (s) {
// s is something like "2010-12-29T07:31:06Z"
s = s.split("T")

0 comments on commit 010f460

Please sign in to comment.