| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 part of dart.core; | 5 part of dart.core; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * An instant in time, such as July 20, 1969, 8:18pm GMT. | 8 * An instant in time, such as July 20, 1969, 8:18pm GMT. |
| 9 * | 9 * |
| 10 * Create a DateTime object by using one of the constructors | 10 * Create a DateTime object by using one of the constructors |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 * where: | 538 * where: |
| 539 * | 539 * |
| 540 * * `yyyy` is a, possibly negative, four digit representation of the year, | 540 * * `yyyy` is a, possibly negative, four digit representation of the year, |
| 541 * if the year is in the range -9999 to 9999, | 541 * if the year is in the range -9999 to 9999, |
| 542 * otherwise it is a signed six digit representation of the year. | 542 * otherwise it is a signed six digit representation of the year. |
| 543 * * `MM` is the month in the range 01 to 12, | 543 * * `MM` is the month in the range 01 to 12, |
| 544 * * `dd` is the day of the month in the range 01 to 31, | 544 * * `dd` is the day of the month in the range 01 to 31, |
| 545 * * `HH` are hours in the range 00 to 23, | 545 * * `HH` are hours in the range 00 to 23, |
| 546 * * `mm` are minutes in the range 00 to 59, | 546 * * `mm` are minutes in the range 00 to 59, |
| 547 * * `ss` are seconds in the range 00 to 59 (no leap seconds), | 547 * * `ss` are seconds in the range 00 to 59 (no leap seconds), |
| 548 * * `mmm` are microseconds in the range 000 to 999, and | 548 * * `mmm` are milliseconds in the range 000 to 999, and |
| 549 * * `uuu` are microseconds in the range 001 to 999. If [microsecond] equals | 549 * * `uuu` are microseconds in the range 001 to 999. If [microsecond] equals |
| 550 * 0, then this part is omitted. | 550 * 0, then this part is omitted. |
| 551 * | 551 * |
| 552 * The resulting string can be parsed back using [parse]. | 552 * The resulting string can be parsed back using [parse]. |
| 553 */ | 553 */ |
| 554 String toIso8601String() { | 554 String toIso8601String() { |
| 555 String y = (year >= -9999 && year <= 9999) ? _fourDigits(year) | 555 String y = (year >= -9999 && year <= 9999) ? _fourDigits(year) |
| 556 : _sixDigits(year); | 556 : _sixDigits(year); |
| 557 String m = _twoDigits(month); | 557 String m = _twoDigits(month); |
| 558 String d = _twoDigits(day); | 558 String d = _twoDigits(day); |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 * In accordance with ISO 8601 | 752 * In accordance with ISO 8601 |
| 753 * a week starts with Monday, which has the value 1. | 753 * a week starts with Monday, which has the value 1. |
| 754 * | 754 * |
| 755 * DateTime moonLanding = DateTime.parse("1969-07-20 20:18:00"); | 755 * DateTime moonLanding = DateTime.parse("1969-07-20 20:18:00"); |
| 756 * assert(moonLanding.weekday == 7); | 756 * assert(moonLanding.weekday == 7); |
| 757 * assert(moonLanding.weekday == DateTime.SUNDAY); | 757 * assert(moonLanding.weekday == DateTime.SUNDAY); |
| 758 * | 758 * |
| 759 */ | 759 */ |
| 760 external int get weekday; | 760 external int get weekday; |
| 761 } | 761 } |
| OLD | NEW |