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); |
} |