| OLD | NEW |
| 1 part of dart.core; | 1 part of dart.core; |
| 2 | 2 |
| 3 class DateTime implements Comparable { | 3 class DateTime implements Comparable { |
| 4 static const int MONDAY = 1; | 4 static const int MONDAY = 1; |
| 5 static const int TUESDAY = 2; | 5 static const int TUESDAY = 2; |
| 6 static const int WEDNESDAY = 3; | 6 static const int WEDNESDAY = 3; |
| 7 static const int THURSDAY = 4; | 7 static const int THURSDAY = 4; |
| 8 static const int FRIDAY = 5; | 8 static const int FRIDAY = 5; |
| 9 static const int SATURDAY = 6; | 9 static const int SATURDAY = 6; |
| 10 static const int SUNDAY = 7; | 10 static const int SUNDAY = 7; |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 DateTime subtract(Duration duration) { | 181 DateTime subtract(Duration duration) { |
| 182 int ms = millisecondsSinceEpoch; | 182 int ms = millisecondsSinceEpoch; |
| 183 return new DateTime.fromMillisecondsSinceEpoch(ms - duration.inMilliseconds, | 183 return new DateTime.fromMillisecondsSinceEpoch(ms - duration.inMilliseconds, |
| 184 isUtc: isUtc); | 184 isUtc: isUtc); |
| 185 } | 185 } |
| 186 Duration difference(DateTime other) { | 186 Duration difference(DateTime other) { |
| 187 int ms = millisecondsSinceEpoch; | 187 int ms = millisecondsSinceEpoch; |
| 188 int otherMs = other.millisecondsSinceEpoch; | 188 int otherMs = other.millisecondsSinceEpoch; |
| 189 return new Duration(milliseconds: ms - otherMs); | 189 return new Duration(milliseconds: ms - otherMs); |
| 190 } | 190 } |
| 191 @patch DateTime._internal(int year, int month, int day, int hour, int minute, | 191 DateTime._internal(int year, int month, int day, int hour, int minute, |
| 192 int second, int millisecond, bool isUtc) | 192 int second, int millisecond, bool isUtc) |
| 193 : this.isUtc = isUtc is bool ? isUtc : throw new ArgumentError(isUtc), | 193 : this.isUtc = isUtc is bool ? isUtc : throw new ArgumentError(isUtc), |
| 194 millisecondsSinceEpoch = checkInt(Primitives.valueFromDecomposedDate( | 194 millisecondsSinceEpoch = checkInt(Primitives.valueFromDecomposedDate( |
| 195 year, month, day, hour, minute, second, millisecond, isUtc)); | 195 year, month, day, hour, minute, second, millisecond, isUtc)); |
| 196 @patch DateTime._now() | 196 DateTime._now() |
| 197 : isUtc = false, | 197 : isUtc = false, |
| 198 millisecondsSinceEpoch = Primitives.dateNow(); | 198 millisecondsSinceEpoch = Primitives.dateNow(); |
| 199 @patch static int _brokenDownDateToMillisecondsSinceEpoch(int year, int month, | 199 static int _brokenDownDateToMillisecondsSinceEpoch(int year, int month, |
| 200 int day, int hour, int minute, int second, int millisecond, bool isUtc) { | 200 int day, int hour, int minute, int second, int millisecond, bool isUtc) { |
| 201 return ((__x0) => DDC$RT.cast(__x0, dynamic, int, "CastGeneral", | 201 return ((__x0) => DDC$RT.cast(__x0, dynamic, int, "CastGeneral", |
| 202 """line 600, column 12 of dart:core/date_time.dart: """, | 202 """line 599, column 12 of dart:core/date_time.dart: """, |
| 203 __x0 is int, true))(Primitives.valueFromDecomposedDate( | 203 __x0 is int, true))(Primitives.valueFromDecomposedDate( |
| 204 year, month, day, hour, minute, second, millisecond, isUtc)); | 204 year, month, day, hour, minute, second, millisecond, isUtc)); |
| 205 } | 205 } |
| 206 @patch String get timeZoneName { | 206 String get timeZoneName { |
| 207 if (isUtc) return "UTC"; | 207 if (isUtc) return "UTC"; |
| 208 return ((__x1) => DDC$RT.cast(__x1, dynamic, String, "CastGeneral", | 208 return ((__x1) => DDC$RT.cast(__x1, dynamic, String, "CastGeneral", |
| 209 """line 607, column 12 of dart:core/date_time.dart: """, __x1 is String, | 209 """line 609, column 12 of dart:core/date_time.dart: """, __x1 is String, |
| 210 true))(Primitives.getTimeZoneName(this)); | 210 true))(Primitives.getTimeZoneName(this)); |
| 211 } | 211 } |
| 212 @patch Duration get timeZoneOffset { | 212 Duration get timeZoneOffset { |
| 213 if (isUtc) return new Duration(); | 213 if (isUtc) return new Duration(); |
| 214 return new Duration(minutes: Primitives.getTimeZoneOffsetInMinutes(this)); | 214 return new Duration(minutes: Primitives.getTimeZoneOffsetInMinutes(this)); |
| 215 } | 215 } |
| 216 @patch int get year => ((__x2) => DDC$RT.cast(__x2, dynamic, int, | 216 int get year => ((__x2) => DDC$RT.cast(__x2, dynamic, int, "CastGeneral", |
| 217 "CastGeneral", """line 617, column 19 of dart:core/date_time.dart: """, | 217 """line 633, column 19 of dart:core/date_time.dart: """, __x2 is int, |
| 218 __x2 is int, true))(Primitives.getYear(this)); | 218 true))(Primitives.getYear(this)); |
| 219 @patch int get month => ((__x3) => DDC$RT.cast(__x3, dynamic, int, | 219 int get month => ((__x3) => DDC$RT.cast(__x3, dynamic, int, "CastGeneral", |
| 220 "CastGeneral", """line 620, column 20 of dart:core/date_time.dart: """, | 220 """line 642, column 20 of dart:core/date_time.dart: """, __x3 is int, |
| 221 __x3 is int, true))(Primitives.getMonth(this)); | 221 true))(Primitives.getMonth(this)); |
| 222 @patch int get day => ((__x4) => DDC$RT.cast(__x4, dynamic, int, | 222 int get day => ((__x4) => DDC$RT.cast(__x4, dynamic, int, "CastGeneral", |
| 223 "CastGeneral", """line 623, column 18 of dart:core/date_time.dart: """, | 223 """line 650, column 18 of dart:core/date_time.dart: """, __x4 is int, |
| 224 __x4 is int, true))(Primitives.getDay(this)); | 224 true))(Primitives.getDay(this)); |
| 225 @patch int get hour => ((__x5) => DDC$RT.cast(__x5, dynamic, int, | 225 int get hour => ((__x5) => DDC$RT.cast(__x5, dynamic, int, "CastGeneral", |
| 226 "CastGeneral", """line 626, column 19 of dart:core/date_time.dart: """, | 226 """line 658, column 19 of dart:core/date_time.dart: """, __x5 is int, |
| 227 __x5 is int, true))(Primitives.getHours(this)); | 227 true))(Primitives.getHours(this)); |
| 228 @patch int get minute => ((__x6) => DDC$RT.cast(__x6, dynamic, int, | 228 int get minute => ((__x6) => DDC$RT.cast(__x6, dynamic, int, "CastGeneral", |
| 229 "CastGeneral", """line 629, column 21 of dart:core/date_time.dart: """, | 229 """line 666, column 21 of dart:core/date_time.dart: """, __x6 is int, |
| 230 __x6 is int, true))(Primitives.getMinutes(this)); | 230 true))(Primitives.getMinutes(this)); |
| 231 @patch int get second => ((__x7) => DDC$RT.cast(__x7, dynamic, int, | 231 int get second => ((__x7) => DDC$RT.cast(__x7, dynamic, int, "CastGeneral", |
| 232 "CastGeneral", """line 632, column 21 of dart:core/date_time.dart: """, | 232 """line 674, column 21 of dart:core/date_time.dart: """, __x7 is int, |
| 233 __x7 is int, true))(Primitives.getSeconds(this)); | 233 true))(Primitives.getSeconds(this)); |
| 234 @patch int get millisecond => ((__x8) => DDC$RT.cast(__x8, dynamic, int, | 234 int get millisecond => ((__x8) => DDC$RT.cast(__x8, dynamic, int, |
| 235 "CastGeneral", """line 635, column 26 of dart:core/date_time.dart: """, | 235 "CastGeneral", """line 682, column 26 of dart:core/date_time.dart: """, |
| 236 __x8 is int, true))(Primitives.getMilliseconds(this)); | 236 __x8 is int, true))(Primitives.getMilliseconds(this)); |
| 237 @patch int get weekday => ((__x9) => DDC$RT.cast(__x9, dynamic, int, | 237 int get weekday => ((__x9) => DDC$RT.cast(__x9, dynamic, int, "CastGeneral", |
| 238 "CastGeneral", """line 638, column 22 of dart:core/date_time.dart: """, | 238 """line 695, column 22 of dart:core/date_time.dart: """, __x9 is int, |
| 239 __x9 is int, true))(Primitives.getWeekday(this)); | 239 true))(Primitives.getWeekday(this)); |
| 240 } | 240 } |
| OLD | NEW |