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

Unified Diff: sdk/lib/core/date_time.dart

Issue 12047046: Change new DateTime.fromString to DateTime.parse. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add return type. Created 7 years, 11 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 | « samples/chat/dart_client/chat.dart ('k') | tests/corelib/date_time2_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/date_time.dart
diff --git a/sdk/lib/core/date_time.dart b/sdk/lib/core/date_time.dart
index 0894c45202d8ffd8a5cf032263ddfc413ac52530..453055d300900535f847a5ff40d00ca623bcbd62 100644
--- a/sdk/lib/core/date_time.dart
+++ b/sdk/lib/core/date_time.dart
@@ -56,7 +56,7 @@ abstract class Date implements Comparable {
factory Date.now() => new DateTime.now();
factory Date.fromString(String formattedString)
- => new DateTime.fromString(formattedString);
+ => DateTime.parse(formattedString);
factory Date.fromMillisecondsSinceEpoch(int millisecondsSinceEpoch,
{bool isUtc: false}) {
@@ -205,7 +205,7 @@ class DateTime implements Date {
* * `"2012-02-27T14Z"`
* * `"-123450101 00:00:00 Z"`: in the year -12345.
*/
- factory DateTime.fromString(String formattedString) {
+ static DateTime parse(String formattedString) {
// Read in (a subset of) ISO 8601.
// Examples:
// - "2012-02-27 13:27:00"
Lasse Reichstein Nielsen 2013/01/24 07:04:24 Remove this comment if it's duplicated in the meth
floitsch 2013/01/24 12:20:26 Done.
« no previous file with comments | « samples/chat/dart_client/chat.dart ('k') | tests/corelib/date_time2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698