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

Unified Diff: lib/i18n/date_format.dart

Issue 10494005: Updated message formatting to be more compatible with Dart string interpolation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated to reflect changes from review Created 8 years, 7 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 | lib/i18n/intl.dart » ('j') | lib/i18n/intl.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/i18n/date_format.dart
diff --git a/lib/i18n/date_format.dart b/lib/i18n/date_format.dart
index 447ec9c47505ae51a7215d08857cea2e60355146..7ba66c33f5869aaf435e43f4e1d72a9b328512b9 100644
--- a/lib/i18n/date_format.dart
+++ b/lib/i18n/date_format.dart
@@ -125,8 +125,6 @@ class DateFormat {
/**
* Named constructors for each of the above values.
- * These could probably be made shorter if we just set the format to the
- * constant and the parsing was lazy.
*/
DateFormat.fullDate() : this.formatDefinition = _fullDate;
DateFormat.longDate() : this.formatDefinition = _longDate;
@@ -140,8 +138,18 @@ class DateFormat {
DateFormat.longDateTime() : this.formatDefinition = _longDateTime;
DateFormat.mediumDateTime() : this.formatDefinition = _mediumDateTime;
DateFormat.shortDateTime() : this.formatDefinition = _shortDateTime;
-
+
+ /**
+ * Explicit constructor given a particular format
+ */
DateFormat(this.formatDefinition);
+
+ /**
+ * Constructors for dates/times that use a default format.
+ */
+ DateFormat.date() {formatDefinition = _fullDate;}
+ DateFormat.time() {formatDefinition = _fullTime;}
+ DateFormat.dateTime() {formatDefinition = _fullDateTime;}
/**
*
« no previous file with comments | « no previous file | lib/i18n/intl.dart » ('j') | lib/i18n/intl.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698