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

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

Issue 2754013002: Format all dart: library files (Closed)
Patch Set: Format all dart: library files Created 3 years, 9 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
« no previous file with comments | « sdk/lib/core/double.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/duration.dart
diff --git a/sdk/lib/core/duration.dart b/sdk/lib/core/duration.dart
index bc1364fba3e3daf3bd71a2a3b76ddc17b392343a..73ec747b8d7f6a6d30053d2188ba0ff643effdef 100644
--- a/sdk/lib/core/duration.dart
+++ b/sdk/lib/core/duration.dart
@@ -63,16 +63,13 @@ class Duration implements Comparable<Duration> {
MICROSECONDS_PER_SECOND * SECONDS_PER_MINUTE;
static const int MICROSECONDS_PER_HOUR =
MICROSECONDS_PER_MINUTE * MINUTES_PER_HOUR;
- static const int MICROSECONDS_PER_DAY =
- MICROSECONDS_PER_HOUR * HOURS_PER_DAY;
-
+ static const int MICROSECONDS_PER_DAY = MICROSECONDS_PER_HOUR * HOURS_PER_DAY;
static const int MILLISECONDS_PER_MINUTE =
MILLISECONDS_PER_SECOND * SECONDS_PER_MINUTE;
static const int MILLISECONDS_PER_HOUR =
MILLISECONDS_PER_MINUTE * MINUTES_PER_HOUR;
- static const int MILLISECONDS_PER_DAY =
- MILLISECONDS_PER_HOUR * HOURS_PER_DAY;
+ static const int MILLISECONDS_PER_DAY = MILLISECONDS_PER_HOUR * HOURS_PER_DAY;
static const int SECONDS_PER_HOUR = SECONDS_PER_MINUTE * MINUTES_PER_HOUR;
static const int SECONDS_PER_DAY = SECONDS_PER_HOUR * HOURS_PER_DAY;
@@ -96,14 +93,14 @@ class Duration implements Comparable<Duration> {
* All individual parts are allowed to be negative.
* All arguments are 0 by default.
*/
- const Duration({int days: 0,
- int hours: 0,
- int minutes: 0,
- int seconds: 0,
- int milliseconds: 0,
- int microseconds: 0})
- : this._microseconds(
- MICROSECONDS_PER_DAY * days +
+ const Duration(
+ {int days: 0,
+ int hours: 0,
+ int minutes: 0,
+ int seconds: 0,
+ int milliseconds: 0,
+ int microseconds: 0})
+ : this._microseconds(MICROSECONDS_PER_DAY * days +
MICROSECONDS_PER_HOUR * hours +
MICROSECONDS_PER_MINUTE * minutes +
MICROSECONDS_PER_SECOND * seconds +
@@ -220,7 +217,7 @@ class Duration implements Comparable<Duration> {
* Returns `true` if this Duration is the same object as [other].
*/
bool operator ==(other) {
- if (other is !Duration) return false;
+ if (other is! Duration) return false;
return _duration == other._duration;
}
@@ -257,6 +254,7 @@ class Duration implements Comparable<Duration> {
if (n >= 10) return "0000$n";
return "00000$n";
}
+
String twoDigits(int n) {
if (n >= 10) return "$n";
return "0$n";
« no previous file with comments | « sdk/lib/core/double.dart ('k') | sdk/lib/core/errors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698