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

Unified Diff: pkg/intl/lib/src/date_format_field.dart

Issue 218493011: partly fix date format dartbug.com/15811. this 0 pads. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | « no previous file | pkg/intl/test/date_time_format_test_core.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/lib/src/date_format_field.dart
diff --git a/pkg/intl/lib/src/date_format_field.dart b/pkg/intl/lib/src/date_format_field.dart
index bf8f8100f8e04f9f15ade4cf4a045832d1d091d0..47a9d7bcc4d85e4328c0c3dca254d941cff9120f 100644
--- a/pkg/intl/lib/src/date_format_field.dart
+++ b/pkg/intl/lib/src/date_format_field.dart
@@ -195,7 +195,7 @@ class _DateFormatPatternField extends _DateFormatField {
if (year < 0) {
year = -year;
}
- return width == 2 ? padTo(2, year % 100) : year.toString();
+ return width == 2 ? padTo(2, year % 100) : padTo(width, year);
}
/**
« no previous file with comments | « no previous file | pkg/intl/test/date_time_format_test_core.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698