| Index: frog/lib/date_implementation.dart
|
| diff --git a/frog/lib/date_implementation.dart b/frog/lib/date_implementation.dart
|
| index 5151804ab51ea1c969a3f02d852530a2dd60be09..8ddd6cc6d5ea3bd29c64a9f6465d0241f3bb3751 100644
|
| --- a/frog/lib/date_implementation.dart
|
| +++ b/frog/lib/date_implementation.dart
|
| @@ -19,8 +19,8 @@ class DateImplementation implements Date {
|
| return new DateImplementation.withTimeZone(
|
| years, month, day,
|
| hours, minutes, seconds, milliseconds,
|
| - isUtc ? const TimeZoneImplementation.utc()
|
| - : new TimeZoneImplementation.local());
|
| + isUtc ? const TimeZone.utc()
|
| + : new TimeZone.local());
|
| }
|
|
|
| DateImplementation.withTimeZone(int years,
|
| @@ -99,8 +99,7 @@ class DateImplementation implements Date {
|
| }
|
|
|
| DateImplementation.fromEpoch(this.value, [bool isUtc = false])
|
| - : this.timeZone = isUtc ? const TimeZoneImplementation.utc()
|
| - : new TimeZoneImplementation.local();
|
| + : this.timeZone = isUtc ? const TimeZone.utc() : new TimeZone.local();
|
|
|
| bool operator ==(other) {
|
| if (other is !DateImplementation) return false;
|
| @@ -124,18 +123,18 @@ class DateImplementation implements Date {
|
| }
|
|
|
| Date toLocal() {
|
| - if (isUtc()) return changeTimeZone(new TimeZoneImplementation.local());
|
| + if (isUtc()) return changeTimeZone(new TimeZone.local());
|
| return this;
|
| }
|
|
|
| Date toUtc() {
|
| if (isUtc()) return this;
|
| - return changeTimeZone(const TimeZoneImplementation.utc());
|
| + return changeTimeZone(const TimeZone.utc());
|
| }
|
|
|
| Date changeTimeZone(TimeZone targetTimeZone) {
|
| if (targetTimeZone == null) {
|
| - targetTimeZone = new TimeZoneImplementation.local();
|
| + targetTimeZone = new TimeZone.local();
|
| }
|
| return new Date.fromEpoch(value, targetTimeZone.isUtc);
|
| }
|
| @@ -284,13 +283,12 @@ class DateImplementation implements Date {
|
| return this.date;''';
|
| }
|
|
|
| -// Trivial implementation of TimeZone
|
| -class TimeZoneImplementation implements TimeZone {
|
| - const TimeZoneImplementation.utc() : this.isUtc = true;
|
| - const TimeZoneImplementation.local() : this.isUtc = false;
|
| +class TimeZone {
|
| + const TimeZone.utc() : this.isUtc = true;
|
| + const TimeZone.local() : this.isUtc = false;
|
|
|
| bool operator ==(other) {
|
| - if (other is !TimeZoneImplementation) return false;
|
| + if (other is !TimeZone) return false;
|
| return isUtc == other.isUtc;
|
| }
|
|
|
|
|