| Index: lib/compiler/implementation/lib/js_helper.dart
|
| diff --git a/lib/compiler/implementation/lib/js_helper.dart b/lib/compiler/implementation/lib/js_helper.dart
|
| index a6683fb3e5f0fa98aa9dd655418e9b30b6db3391..2f054e80b2d070f86c70c18db4e562e408bbd23c 100644
|
| --- a/lib/compiler/implementation/lib/js_helper.dart
|
| +++ b/lib/compiler/implementation/lib/js_helper.dart
|
| @@ -438,11 +438,24 @@ class Primitives {
|
| milliseconds, isUtc) {
|
| checkInt(years);
|
| checkInt(month);
|
| + if (month < 1 || 12 < month) throw new IllegalArgumentException(month);
|
| checkInt(day);
|
| + if (day < 1 || 31 < day) throw new IllegalArgumentException(day);
|
| checkInt(hours);
|
| + if (hours < 0 || 24 < hours) throw new IllegalArgumentException(hours);
|
| checkInt(minutes);
|
| + if (minutes < 0 || 59 < minutes) {
|
| + throw new IllegalArgumentException(minutes);
|
| + }
|
| checkInt(seconds);
|
| + if (seconds < 0 || 59 < seconds) {
|
| + // TODO(ahe): Leap seconds?
|
| + throw new IllegalArgumentException(seconds);
|
| + }
|
| checkInt(milliseconds);
|
| + if (milliseconds < 0 || 999 < milliseconds) {
|
| + throw new IllegalArgumentException(milliseconds);
|
| + }
|
| checkBool(isUtc);
|
| var jsMonth = month - 1;
|
| var value;
|
|
|