File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name = " UnixTimes"
22uuid = " ab1a18e7-b408-4913-896c-624bb82ed7f4"
33authors = [" Christian Rorvik <christian.rorvik@gmail.com>" ]
4- version = " 1.6 .0"
4+ version = " 1.7 .0"
55
66[deps ]
77Dates = " ade2ca70-3891-5945-98fb-dc099432e06a"
@@ -10,9 +10,11 @@ Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
1010Makie = " ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
1111Observables = " 510215fc-4207-5dde-b226-833fc4488ee2"
1212TimeZones = " f269a46b-ccf7-5d73-abea-4c690281aa53"
13+ StructTypes = " 856f2bd8-1eba-4b0a-8007-ebc267875bd4"
1314
1415[extensions ]
1516UnixTimesMakieExt = [" Makie" , " Observables" ]
17+ UnixTimesStructTypesExt = " StructTypes"
1618UnixTimesTimeZonesExt = " TimeZones"
1719
1820[compat ]
Original file line number Diff line number Diff line change 1+ module UnixTimesStructTypesExt
2+
3+ using Dates
4+ using StructTypes
5+ using UnixTimes
6+
7+ StructTypes. StructType (:: Type{UnixTime} ) = StructTypes. CustomStruct ()
8+ StructTypes. lower (x:: UnixTime ) = Dates. value (x)
9+ StructTypes. lowertype (:: Type{UnixTime} ) = Int64
10+ StructTypes. construct (:: Type{UnixTime} , x:: Int64 ) =
11+ UnixTime (Dates. UTInstant (Dates. Nanosecond (x)))
12+
13+ end
You can’t perform that action at this time.
0 commit comments