| Index: lib/i18n/date_format.dart
|
| ===================================================================
|
| --- lib/i18n/date_format.dart (revision 9194)
|
| +++ lib/i18n/date_format.dart (working copy)
|
| @@ -46,9 +46,7 @@
|
| * Items marked with '#' work differently than in Java.
|
| *
|
| * The count of pattern letters determine the format.
|
| - *
|
| - * **Text**:
|
| - *
|
| + * **Text**:
|
| * * 4 or more pattern letters--use full form,
|
| * * less than 4--use short or abbreviated form if one exists.
|
| * In parsing, we will always try long format, then short.
|
| @@ -108,6 +106,8 @@
|
| * that point, the parse of the run fails.
|
| */
|
|
|
| +#library('date_format');
|
| +
|
| class DateFormat {
|
|
|
| /** Definition of how this object formats dates. */
|
| @@ -126,8 +126,7 @@
|
| * given the pattern.
|
| */
|
| // TODO(efortuna): Hear back from i18n about Time Zones and the "core set"
|
| - // of skeleton patterns. When this is complete, also properly comment these
|
| - // so the documentation is available on api_docs.
|
| + // of skeleton patterns.
|
| // Example of how this looks in the US
|
| // locale.
|
| static final String Hm = 'Hm'; // HH:mm
|
| @@ -172,44 +171,40 @@
|
| /**
|
| * Constructors for dates/times that use a default format.
|
| */
|
| - DateFormat.Hm([locale=this._locale]) : _formatDefinition = Hm;
|
| - DateFormat.Hms([locale=this._locale]) : _formatDefinition = Hms;
|
| - DateFormat.M([locale=this._locale]) : _formatDefinition = M;
|
| - DateFormat.MEd([locale=this._locale]) : _formatDefinition = MEd;
|
| - DateFormat.MMM([locale=this._locale]) : _formatDefinition = MMM;
|
| - DateFormat.MMMEd([locale=this._locale]) : _formatDefinition = MMMEd;
|
| - DateFormat.MMMMEd([locale=this._locale]) : _formatDefinition = MMMMEd;
|
| - DateFormat.MMMMd([locale=this._locale]) : _formatDefinition = MMMMd;
|
| - DateFormat.MMMd([locale=this._locale]) : _formatDefinition = MMMd;
|
| - DateFormat.Md([locale=this._locale]) : _formatDefinition = Md;
|
| - DateFormat.d([locale=this._locale]) : _formatDefinition = d;
|
| - DateFormat.hm([locale=this._locale]) : _formatDefinition = hm;
|
| - DateFormat.ms([locale=this._locale]) : _formatDefinition = ms;
|
| - DateFormat.y([locale=this._locale]) : _formatDefinition = y;
|
| - DateFormat.yM([locale=this._locale]) : _formatDefinition = yM;
|
| - DateFormat.yMEd([locale=this._locale]) : _formatDefinition = yMEd;
|
| - DateFormat.yMMM([locale=this._locale]) : _formatDefinition = yMMM;
|
| - DateFormat.yMMMEd([locale=this._locale]) : _formatDefinition = yMMMEd;
|
| - DateFormat.yMMMM([locale=this._locale]) : _formatDefinition = yMMMM;
|
| - DateFormat.yQ([locale=this._locale]) : _formatDefinition = yQ;
|
| - DateFormat.yQQQ([locale=this._locale]) : _formatDefinition = yQQQ;
|
| + DateFormat.Hm([this._locale]) : _formatDefinition = Hm;
|
| + DateFormat.Hms([this._locale]) : _formatDefinition = Hms;
|
| + DateFormat.M([this._locale]) : _formatDefinition = M;
|
| + DateFormat.MEd([this._locale]) : _formatDefinition = MEd;
|
| + DateFormat.MMM([this._locale]) : _formatDefinition = MMM;
|
| + DateFormat.MMMEd([this._locale]) : _formatDefinition = MMMEd;
|
| + DateFormat.MMMMEd([this._locale]) : _formatDefinition = MMMMEd;
|
| + DateFormat.MMMMd([this._locale]) : _formatDefinition = MMMMd;
|
| + DateFormat.MMMd([this._locale]) : _formatDefinition = MMMd;
|
| + DateFormat.Md([this._locale]) : _formatDefinition = Md;
|
| + DateFormat.d([this._locale]) : _formatDefinition = d;
|
| + DateFormat.hm([this._locale]) : _formatDefinition = hm;
|
| + DateFormat.ms([this._locale]) : _formatDefinition = ms;
|
| + DateFormat.y([this._locale]) : _formatDefinition = y;
|
| + DateFormat.yM([this._locale]) : _formatDefinition = yM;
|
| + DateFormat.yMEd([this._locale]) : _formatDefinition = yMEd;
|
| + DateFormat.yMMM([this._locale]) : _formatDefinition = yMMM;
|
| + DateFormat.yMMMEd([this._locale]) : _formatDefinition = yMMMEd;
|
| + DateFormat.yMMMM([this._locale]) : _formatDefinition = yMMMM;
|
| + DateFormat.yQ([this._locale]) : _formatDefinition = yQ;
|
| + DateFormat.yQQQ([this._locale]) : _formatDefinition = yQQQ;
|
|
|
| - DateFormat.fullDate([locale=this._locale]) : _formatDefinition = fullDate;
|
| - DateFormat.longDate([locale=this._locale]) : _formatDefinition = longDate;
|
| - DateFormat.mediumDate([locale=this._locale]) : _formatDefinition = mediumDate;
|
| - DateFormat.shortDate([locale=this._locale]) : _formatDefinition = shortDate;
|
| - DateFormat.fullTime([locale=this._locale]) : _formatDefinition = fullTime;
|
| - DateFormat.longTime([locale=this._locale]) : _formatDefinition = longTime;
|
| - DateFormat.mediumTime([locale=this._locale]) : _formatDefinition = mediumTime;
|
| - DateFormat.shortTime([locale=this._locale]) : _formatDefinition = shortTime;
|
| - DateFormat.fullDateTime([locale=this._locale]) :
|
| - _formatDefinition = fullDateTime;
|
| - DateFormat.longDateTime([locale=this._locale]) :
|
| - _formatDefinition = longDateTime;
|
| - DateFormat.mediumDateTime([locale=this._locale]) :
|
| - _formatDefinition = mediumDateTime;
|
| - DateFormat.shortDateTime([locale=this._locale]) :
|
| - _formatDefinition = shortDateTime;
|
| + DateFormat.fullDate([this._locale]) : _formatDefinition = fullDate;
|
| + DateFormat.longDate([this._locale]) : _formatDefinition = longDate;
|
| + DateFormat.mediumDate([this._locale]) : _formatDefinition = mediumDate;
|
| + DateFormat.shortDate([this._locale]) : _formatDefinition = shortDate;
|
| + DateFormat.fullTime([this._locale]) : _formatDefinition = fullTime;
|
| + DateFormat.longTime([this._locale]) : _formatDefinition = longTime;
|
| + DateFormat.mediumTime([this._locale]) : _formatDefinition = mediumTime;
|
| + DateFormat.shortTime([this._locale]) : _formatDefinition = shortTime;
|
| + DateFormat.fullDateTime([this._locale]) : _formatDefinition = fullDateTime;
|
| + DateFormat.longDateTime([this._locale]) : _formatDefinition = longDateTime;
|
| + DateFormat.mediumDateTime([this._locale]) : _formatDefinition = mediumDateTime;
|
| + DateFormat.shortDateTime([this._locale]) : _formatDefinition = shortDateTime;
|
|
|
| /**
|
| * Constructor accepts a [formatDefinition], which can be a String, one of the
|
|
|