| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 */ | 401 */ |
| 402 Number.toFixedIfFloating = function(value) | 402 Number.toFixedIfFloating = function(value) |
| 403 { | 403 { |
| 404 if (!value || isNaN(value)) | 404 if (!value || isNaN(value)) |
| 405 return value; | 405 return value; |
| 406 var number = Number(value); | 406 var number = Number(value); |
| 407 return number % 1 ? number.toFixed(3) : String(number); | 407 return number % 1 ? number.toFixed(3) : String(number); |
| 408 } | 408 } |
| 409 | 409 |
| 410 /** | 410 /** |
| 411 * @return {boolean} |
| 412 */ |
| 413 Date.prototype.isValid = function() |
| 414 { |
| 415 return !isNaN(this.getTime()) |
| 416 } |
| 417 |
| 418 /** |
| 411 * @return {string} | 419 * @return {string} |
| 412 */ | 420 */ |
| 413 Date.prototype.toISO8601Compact = function() | 421 Date.prototype.toISO8601Compact = function() |
| 414 { | 422 { |
| 415 /** | 423 /** |
| 416 * @param {number} x | 424 * @param {number} x |
| 417 * @return {string} | 425 * @return {string} |
| 418 */ | 426 */ |
| 419 function leadZero(x) | 427 function leadZero(x) |
| 420 { | 428 { |
| (...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1532 while (rightIndex < rightKeys.length) { | 1540 while (rightIndex < rightKeys.length) { |
| 1533 var rightKey = rightKeys[rightIndex++]; | 1541 var rightKey = rightKeys[rightIndex++]; |
| 1534 added.push(other.get(rightKey)); | 1542 added.push(other.get(rightKey)); |
| 1535 } | 1543 } |
| 1536 return { | 1544 return { |
| 1537 added: added, | 1545 added: added, |
| 1538 removed: removed, | 1546 removed: removed, |
| 1539 equal: equal | 1547 equal: equal |
| 1540 } | 1548 } |
| 1541 } | 1549 } |
| OLD | NEW |