From d53218d09eec983eb3ddd9f98d2c54b58d1856ff Mon Sep 17 00:00:00 2001 From: Wynand Badenhorst Date: Fri, 6 Aug 2021 11:10:55 -0500 Subject: [PATCH 1/2] Switch FixedTimeZone to InlineStrings name --- Project.toml | 4 +++- src/TimeZones.jl | 1 + src/types/fixedtimezone.jl | 3 ++- test/types/fixedtimezone.jl | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index aa0486b5..1429c602 100644 --- a/Project.toml +++ b/Project.toml @@ -1,12 +1,13 @@ name = "TimeZones" uuid = "f269a46b-ccf7-5d73-abea-4c690281aa53" authors = ["Curtis Vogt "] -version = "1.6.0" +version = "1.6.1" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6" Future = "9fa8497b-333b-5362-9e8d-4d0656e87820" +InlineStrings = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48" LazyArtifacts = "4af54fe1-eca0-43a8-85a7-787d91b784e3" Mocking = "78c3b35d-d492-501b-9361-3d52fe80e533" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" @@ -17,6 +18,7 @@ Unicode = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" [compat] Downloads = "1" +InlineStrings = "1.0" Mocking = "0.7" RecipesBase = "0.7, 0.8, 1" julia = "1.3" diff --git a/src/TimeZones.jl b/src/TimeZones.jl index b69e0bec..70b3058c 100644 --- a/src/TimeZones.jl +++ b/src/TimeZones.jl @@ -5,6 +5,7 @@ using Printf using Serialization using RecipesBase: RecipesBase, @recipe using Unicode +using InlineStrings: InlineString15 import Dates: TimeZone, UTC diff --git a/src/types/fixedtimezone.jl b/src/types/fixedtimezone.jl index 1d349ca0..c7dacecb 100644 --- a/src/types/fixedtimezone.jl +++ b/src/types/fixedtimezone.jl @@ -30,7 +30,7 @@ const FIXED_TIME_ZONE_REGEX = r""" A `TimeZone` with a constant offset for all of time. """ struct FixedTimeZone <: TimeZone - name::String + name::InlineString15 offset::UTCOffset end @@ -95,3 +95,4 @@ end name(tz::FixedTimeZone) = tz.name rename(tz::FixedTimeZone, name::AbstractString) = FixedTimeZone(name, tz.offset) + diff --git a/test/types/fixedtimezone.jl b/test/types/fixedtimezone.jl index 94cae0ab..a7a93c9c 100644 --- a/test/types/fixedtimezone.jl +++ b/test/types/fixedtimezone.jl @@ -1,4 +1,6 @@ @testset "FixedTimeZone" begin + @test isbitstype(FixedTimeZone) + @test FixedTimeZone("0123") == FixedTimeZone("UTC+01:23", 4980) @test FixedTimeZone("+0123") == FixedTimeZone("UTC+01:23", 4980) @test FixedTimeZone("-0123") == FixedTimeZone("UTC-01:23", -4980) From bf015dbf76c17abf1d83ace761c27d7054071ea0 Mon Sep 17 00:00:00 2001 From: Curtis Vogt Date: Tue, 12 Oct 2021 14:35:23 -0500 Subject: [PATCH 2/2] Revert version bump --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index cf36c3da..b5d78347 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "TimeZones" uuid = "f269a46b-ccf7-5d73-abea-4c690281aa53" authors = ["Curtis Vogt "] -version = "1.6.1" +version = "1.6.0" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"