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

Unified Diff: lib/coreimpl/date.dart

Issue 11233032: [core] cleanup === and !== (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 months 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
Index: lib/coreimpl/date.dart
===================================================================
--- lib/coreimpl/date.dart (revision 13856)
+++ lib/coreimpl/date.dart (working copy)
@@ -20,16 +20,16 @@
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);
}
@@ -46,10 +46,10 @@
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++;
@@ -67,7 +67,7 @@
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) {

Powered by Google App Engine
This is Rietveld 408576698