From 8633921e765bae17f18d2bbf9178503451b78f8c Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Fri, 22 Sep 2023 10:14:25 +0200 Subject: [PATCH] Add details and transitions inspector views to ZTimezone --- .../ZTimestamp-GT/ZTimezone.extension.st | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 repository/ZTimestamp-GT/ZTimezone.extension.st diff --git a/repository/ZTimestamp-GT/ZTimezone.extension.st b/repository/ZTimestamp-GT/ZTimezone.extension.st new file mode 100644 index 0000000..78c96a5 --- /dev/null +++ b/repository/ZTimestamp-GT/ZTimezone.extension.st @@ -0,0 +1,25 @@ +Extension { #name : #ZTimezone } + +{ #category : #'*ZTimestamp-GT' } +ZTimezone >> gtViewDetailsIn: composite [ + + ^ composite columnedList + title: 'Details'; + items: [ {('id' -> self id). + ('current offset' -> (self offsetForTimestamp: ZTimestamp now)). + ('current subzone' -> (self subzoneForTimestamp: ZTimestamp now)) } ]; + column: 'Key' text: #key; + column: 'Value' text: #value; + send: #value +] + +{ #category : #'*ZTimestamp-GT' } +ZTimezone >> gtViewTransitionsIn: composite [ + + ^ composite columnedList + title: 'Transitions'; + items: [ self resolvedTransitions ]; + column: 'Start' text: #key; + column: 'Subzone' text: #value; + send: #value +]