A new version of Chronology-Core was added to project The Inbox:
http://source.squeak.org/inbox/Chronology-Core-cbc.10.mcz ==================== Summary ==================== Name: Chronology-Core-cbc.10 Author: cbc Time: 15 June 2017, 5:24:03.228466 pm UUID: 89e0d1fb-ce97-1a43-aa4b-d3c735c3bb2e Ancestors: Chronology-Core-pre.9 Cache TimeZones. Also, fix comment on TimeZone class>>default. =============== Diff against Chronology-Core-pre.9 =============== Item was changed: Object subclass: #TimeZone instanceVariableNames: 'offset abbreviation name' + classVariableNames: 'TimeZones' - classVariableNames: '' poolDictionaries: 'ChronologyConstants' category: 'Chronology-Core'! !TimeZone commentStamp: 'dtl 7/11/2009 15:03' prior: 0! TimeZone is a simple class to colect the information identifying a UTC time zone. offset - Duration - the time zone's offset from UTC abbreviation - String - the abbreviated name for the time zone. name - String - the name of the time zone. TimeZone class >> #timeZones returns an array of the known time zones TimeZone class >> #default returns the default time zone (Grenwich Mean Time) ! Item was changed: ----- Method: TimeZone class>>default (in category 'accessing') ----- default + "Answer the default time zone - UTC" - "Answer the default time zone - GMT" - ^ self timeZones detect: [ :tz | tz offset = Duration zero ]! Item was added: + ----- Method: TimeZone class>>initialize (in category 'class initialization') ----- + initialize + TimeZones := Dictionary new. + ! Item was changed: ----- Method: TimeZone class>>offset:name:abbreviation: (in category 'instance creation') ----- offset: aDuration name: aName abbreviation: anAbbreviation + ^TimeZones at: { aDuration. aName. anAbbreviation. } ifAbsentPut: [ + self new + offset: aDuration; + name: aName; + abbreviation: anAbbreviation; + yourself + ] - - ^ self new - offset: aDuration; - name: aName; - abbreviation: anAbbreviation; - yourself ! |
Before this change: TimeZone default = TimeZone default "==> false" After this change: TimeZone default = TimeZone default "==> true" Thanks, cbc On Thu, Jun 15, 2017 at 5:24 PM, <[hidden email]> wrote: A new version of Chronology-Core was added to project The Inbox: |
Free forum by Nabble | Edit this page |