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

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

Issue 119263002: Fix bug in Duration.toString. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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 | « no previous file | tests/corelib/duration_test.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 77633a67870abb60aee91d9a5e75f316555bc21e..d174012baa5bfd869c2a227d51c7c83e563c0c1b 100644
--- a/sdk/lib/core/duration.dart
+++ b/sdk/lib/core/duration.dart
@@ -23,7 +23,7 @@ part of dart.core;
* Use one of the properties, such as [inDays],
* to retrieve the integer value of the Duration in the specified time unit.
* Note that the returned value is rounded down.
- * For example,
+ * For example,
*
* Duration aLongWeekend = new Duration(hours:88);
* assert(aLongWeekend.inDays == 3);
@@ -223,7 +223,7 @@ class Duration implements Comparable<Duration> {
if (n >= 10000) return "0$n";
if (n >= 1000) return "00$n";
if (n >= 100) return "000$n";
- if (n > 10) return "0000$n";
+ if (n >= 10) return "0000$n";
return "00000$n";
}
String twoDigits(int n) {
« no previous file with comments | « no previous file | tests/corelib/duration_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698