Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1137)

Unified Diff: sdk/lib/core/date.dart

Issue 11361190: a === b -> identical(a, b) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/collection/splay_tree.dart ('k') | sdk/lib/core/errors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/date.dart
diff --git a/sdk/lib/core/date.dart b/sdk/lib/core/date.dart
index 7ab46cf07baed8de1341cfc2f0b0a5ae6b92cd8c..9f4e9178a565fb30da6c909050b8ef83f366910e 100644
--- a/sdk/lib/core/date.dart
+++ b/sdk/lib/core/date.dart
@@ -261,16 +261,16 @@ class _DateImpl implements Date {
r'^([+-]?\d?\d\d\d\d)-?(\d\d)-?(\d\d)' // The day part.
r'(?:[ T](\d\d)(?::?(\d\d)(?::?(\d\d)(.\d{1,6})?)?)? ?([zZ])?)?$');
Match match = re.firstMatch(formattedString);
- if (match !== null) {
+ if (match != null) {
int parseIntOrZero(String matched) {
// TODO(floitsch): we should not need to test against the empty string.
- if (matched === null || matched == "") return 0;
+ if (matched == null || matched == "") return 0;
return int.parse(matched);
}
double parseDoubleOrZero(String matched) {
// TODO(floitsch): we should not need to test against the empty string.
- if (matched === null || matched == "") return 0.0;
+ if (matched == null || matched == "") return 0.0;
return double.parse(matched);
}
@@ -287,10 +287,10 @@ class _DateImpl implements Date {
millisecond = 999;
}
// TODO(floitsch): we should not need to test against the empty string.
- bool isUtc = (match[8] !== null) && (match[8] != "");
+ bool isUtc = (match[8] != null) && (match[8] != "");
int millisecondsSinceEpoch = _brokenDownDateToMillisecondsSinceEpoch(
years, month, day, hour, minute, second, millisecond, isUtc);
- if (millisecondsSinceEpoch === null) {
+ if (millisecondsSinceEpoch == null) {
throw new ArgumentError(formattedString);
}
if (addOneMillisecond) millisecondsSinceEpoch++;
@@ -308,7 +308,7 @@ class _DateImpl implements Date {
if (millisecondsSinceEpoch.abs() > _MAX_MILLISECONDS_SINCE_EPOCH) {
throw new ArgumentError(millisecondsSinceEpoch);
}
- if (isUtc === null) throw new ArgumentError(isUtc);
+ if (isUtc == null) throw new ArgumentError(isUtc);
}
bool operator ==(other) {
« no previous file with comments | « sdk/lib/collection/splay_tree.dart ('k') | sdk/lib/core/errors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698