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

Unified Diff: lib/core/date.dart

Issue 11090016: Change core lib, dart2js, and more for new optional parameters syntax (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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
Index: lib/core/date.dart
===================================================================
--- lib/core/date.dart (revision 13392)
+++ lib/core/date.dart (working copy)
@@ -43,19 +43,19 @@
* in the local time zone if [isUtc] is false.
*
* [month] and [day] are one-based. For example
- * [:new Date(1938, 1, 10)] represents the 10th of January 1938.
+ * [:new Date(1938, month: 1, day: 10)] represents the 10th of January 1938.
*/
factory Date(int year,
Lasse Reichstein Nielsen 2012/10/09 12:35:00 Man, you just hit on our bad consciences there. We
Lasse Reichstein Nielsen 2012/10/09 12:50:40 Using optional positional parameters will make isU
regis 2012/10/11 01:33:56 Done.
regis 2012/10/11 01:33:56 Done.
- [int month = 1,
- int day = 1,
- int hour = 0,
- int minute = 0,
- int second = 0,
- int millisecond = 0,
- bool isUtc = false]) {
- return new DateImplementation(year, month, day,
- hour, minute, second,
- millisecond, isUtc);
+ {int month: 1,
+ int day: 1,
+ int hour: 0,
+ int minute: 0,
+ int second: 0,
+ int millisecond: 0,
+ bool isUtc: false}) {
+ return new DateImplementation(year, month: month, day: day,
Lasse Reichstein Nielsen 2012/10/09 12:35:00 Modify to match requested change in DateImplementa
regis 2012/10/11 01:33:56 Done.
+ hour: hour, minute: minute, second: second,
+ millisecond: millisecond, isUtc: isUtc);
}
/**
@@ -82,7 +82,7 @@
// tools don't yet. Eventually we want to have default values here.
// TODO(lrn): Have two constructors instead of taking an optional bool.
factory Date.fromMillisecondsSinceEpoch(int millisecondsSinceEpoch,
- [bool isUtc = false]) {
+ {bool isUtc: false}) {
return new DateImplementation.fromMillisecondsSinceEpoch(
millisecondsSinceEpoch, isUtc);
}

Powered by Google App Engine
This is Rietveld 408576698