OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | |
2 // for details. All rights reserved. Use of this source code is governed by a | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 // Dart core library. | |
6 | |
7 // JavaScript implementation of TimeZoneImplementation. | |
8 class TimeZoneImplementation implements TimeZone { | |
9 const TimeZoneImplementation.utc() : this.isUtc = true; | |
10 const TimeZoneImplementation.local() : this.isUtc = false; | |
11 | |
12 bool operator ==(other) { | |
13 if (!(other is TimeZoneImplementation)) return false; | |
14 return isUtc == other.isUtc; | |
15 } | |
16 | |
17 String toString() { | |
18 if (isUtc) return "TimeZone (UTC)"; | |
19 return "TimeZone (Local)"; | |
20 } | |
21 | |
22 final bool isUtc; | |
23 } | |
OLD | NEW |