diff options
| author | Igor Minar | 2010-11-06 23:50:04 -0700 | 
|---|---|---|
| committer | Igor Minar | 2010-11-08 22:49:29 -0800 | 
| commit | 1a43f36e2395c77005fd14fafd43808548b111f2 (patch) | |
| tree | 456581194d95374b8654e4e0357fcf1f366c62c9 /src/Angular.js | |
| parent | 1c305dc67a73b8096132c709ee1a2f83879aab98 (diff) | |
| download | angular.js-1a43f36e2395c77005fd14fafd43808548b111f2.tar.bz2 | |
Add isDate method + fix old code
Diffstat (limited to 'src/Angular.js')
| -rw-r--r-- | src/Angular.js | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Angular.js b/src/Angular.js index 16b31d4b..73f2841a 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -317,6 +317,7 @@ function isDefined(value){ return typeof value != $undefined; }  function isObject(value){ return value!=_null && typeof value == $object;}  function isString(value){ return typeof value == $string;}  function isNumber(value){ return typeof value == $number;} +function isDate(value){ return value instanceof Date; }  function isArray(value) { return value instanceof Array; }  function isFunction(value){ return typeof value == $function;}  function isBoolean(value) { return typeof value == $boolean;} @@ -431,7 +432,7 @@ function copy(source, destination){      if (source) {        if (isArray(source)) {          destination = copy(source, []); -      } else if (source instanceof Date) { +      } else if (isDate(source)) {          destination = new Date(source.getTime());        } else if (isObject(source)) {          destination = copy(source, {});  | 
