| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * DateFormat is for formatting and parsing dates in a locale-sensitive | 6 * DateFormat is for formatting and parsing dates in a locale-sensitive |
| 7 * manner. | 7 * manner. |
| 8 * It allows the user to choose from a set of standard date time formats as well | 8 * It allows the user to choose from a set of standard date time formats as well |
| 9 * as specify a customized pattern under certain locales. Date elements that | 9 * as specify a customized pattern under certain locales. Date elements that |
| 10 * vary across locales include month name, week name, field order, etc. | 10 * vary across locales include month name, week name, field order, etc. |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 * format. | 223 * format. |
| 224 */ | 224 */ |
| 225 String parse(String inputString) { | 225 String parse(String inputString) { |
| 226 return inputString; | 226 return inputString; |
| 227 } | 227 } |
| 228 | 228 |
| 229 /** | 229 /** |
| 230 * Format the given [date] object according to preset pattern and current | 230 * Format the given [date] object according to preset pattern and current |
| 231 * locale and return a formated string for the given date. | 231 * locale and return a formated string for the given date. |
| 232 */ | 232 */ |
| 233 String format(Date date, [TimeZone timeZone]) { | 233 String format(Date date) { |
| 234 // TODO(efortuna): optional TimeZone argument? TimeZone is deprecated... | 234 // TODO(efortuna): readd optional TimeZone argument (or similar)? |
| 235 return date.toString(); | 235 return date.toString(); |
| 236 } | 236 } |
| 237 | 237 |
| 238 /** | 238 /** |
| 239 * Returns a date string indicating how long ago (3 hours, 2 minutes) | 239 * Returns a date string indicating how long ago (3 hours, 2 minutes) |
| 240 * something has happened or how long in the future something will happen | 240 * something has happened or how long in the future something will happen |
| 241 * given a [reference] Date relative to the current time. | 241 * given a [reference] Date relative to the current time. |
| 242 */ | 242 */ |
| 243 String formatDuration(Date reference) { | 243 String formatDuration(Date reference) { |
| 244 return ''; | 244 return ''; |
| 245 } | 245 } |
| 246 | 246 |
| 247 /** | 247 /** |
| 248 * Formats a string indicating how long ago (negative [duration]) or how far | 248 * Formats a string indicating how long ago (negative [duration]) or how far |
| 249 * in the future (positive [duration]) some time is with respect to a | 249 * in the future (positive [duration]) some time is with respect to a |
| 250 * reference [date]. | 250 * reference [date]. |
| 251 */ | 251 */ |
| 252 String formatDurationFrom(Duration duration, Date date) { | 252 String formatDurationFrom(Duration duration, Date date) { |
| 253 return ''; | 253 return ''; |
| 254 } | 254 } |
| 255 } | 255 } |
| OLD | NEW |