Index: sdk/lib/core/date_time.dart |
diff --git a/sdk/lib/core/date_time.dart b/sdk/lib/core/date_time.dart |
index 0b4a63a19a0c63eb8fe2baa877c109c800b595a6..566260607c1c566f0670e58e90bc2377bde162a3 100644 |
--- a/sdk/lib/core/date_time.dart |
+++ b/sdk/lib/core/date_time.dart |
@@ -48,7 +48,7 @@ part of dart.core; |
* unless explicitly created in the UTC time zone. |
* |
* DateTime dDay = new DateTime.utc(1944, 6, 6); |
- * |
+ * |
* Use [isUtc] to determine whether a DateTime object is based in UTC. |
* Use the methods [toLocal] and [toUtc] |
* to get the equivalent date/time value specified in the other time zone. |
@@ -199,13 +199,14 @@ class DateTime implements Comparable { |
* * `"20120227"` |
* * `"+20120227"` |
* * `"2012-02-27T14Z"` |
+ * * `"2012-02-27T14+00:00"` |
* * `"-123450101 00:00:00 Z"`: in the year -12345. |
*/ |
// TODO(floitsch): specify grammar. |
static DateTime parse(String formattedString) { |
final RegExp re = new RegExp( |
r'^([+-]?\d?\d\d\d\d)-?(\d\d)-?(\d\d)' // The day part. |
- r'(?:[ T](\d\d)(?::?(\d\d)(?::?(\d\d)(.\d{1,6})?)?)? ?([zZ])?)?$'); |
+ r'(?:[ T](\d\d)(?::?(\d\d)(?::?(\d\d)(.\d{1,6})?)?)? ?([zZ]|(\+00(:?00)?)?))?$'); |
floitsch
2013/10/28 23:01:24
80 chars.
The "(\+00" should be a non-capturing ("
|
Match match = re.firstMatch(formattedString); |
if (match != null) { |
int parseIntOrZero(String matched) { |