Formatting.

This commit is contained in:
Alexander Ljungberg committed 2012-04-08 18:10:41 +02:00
1 parent 5893b33962
commit b746824933
2 files changed
+5 -7

No files matched your search

+1 -1
View File
@@ -422,7 +422,7 @@
if (aKey.indexOf("@") === 0)
{
if (aKey.indexOf(".") !== -1)
[CPException raise:CPInvalidArgumentException reason:"called valueForKey: on an array with a complex key ("+aKey+"). use valueForKeyPath:"];
[CPException raise:CPInvalidArgumentException reason:"called valueForKey: on an array with a complex key (" + aKey + "). use valueForKeyPath:"];
if (aKey == "@count")
return length;
+4 -6
View File
@@ -119,7 +119,7 @@ var CPDateReferenceDate = new Date(Date.UTC(2001, 1, 1, 0, 0, 0, 0));
date.setMinutes(d[5]);
date.setSeconds(d[6]);
self = new Date(date.getTime() + (timeZoneOffset - date.getTimezoneOffset()) * 60 * 1000);
self = new Date(date.getTime() + (timeZoneOffset - date.getTimezoneOffset()) * 60 * 1000);
return self;
}
@@ -236,7 +236,9 @@ var numericKeys = [1, 4, 5, 6, 7, 10, 11];
Date.parseISO8601 = function (date)
{
var timestamp, struct, minutesOffset = 0;
var timestamp,
struct,
minutesOffset = 0;
// First, check for native parsing.
timestamp = Date.parse(date);
@@ -245,9 +247,7 @@ Date.parseISO8601 = function (date)
{
// avoid NaN timestamps caused by “undefined” values being passed to Date.UTC
for (var i = 0, k; (k = numericKeys[i]); ++i)
{
struct[k] = +struct[k] || 0;
}
// allow undefined days and months
struct[2] = (+struct[2] || 1) - 1;
@@ -258,9 +258,7 @@ Date.parseISO8601 = function (date)
minutesOffset = struct[10] * 60 + struct[11];
if (struct[9] === '+')
{
minutesOffset = 0 - minutesOffset;
}
}
return Date.UTC(struct[1], struct[2], struct[3], struct[4], struct[5] + minutesOffset, struct[6], struct[7]);