Skip to content

Commit d53218d

Browse files
committed
Switch FixedTimeZone to InlineStrings name
1 parent 482f3b7 commit d53218d

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
name = "TimeZones"
22
uuid = "f269a46b-ccf7-5d73-abea-4c690281aa53"
33
authors = ["Curtis Vogt <curtis.vogt@gmail.com>"]
4-
version = "1.6.0"
4+
version = "1.6.1"
55

66
[deps]
77
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
88
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
99
Future = "9fa8497b-333b-5362-9e8d-4d0656e87820"
10+
InlineStrings = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48"
1011
LazyArtifacts = "4af54fe1-eca0-43a8-85a7-787d91b784e3"
1112
Mocking = "78c3b35d-d492-501b-9361-3d52fe80e533"
1213
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
@@ -17,6 +18,7 @@ Unicode = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
1718

1819
[compat]
1920
Downloads = "1"
21+
InlineStrings = "1.0"
2022
Mocking = "0.7"
2123
RecipesBase = "0.7, 0.8, 1"
2224
julia = "1.3"

src/TimeZones.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ using Printf
55
using Serialization
66
using RecipesBase: RecipesBase, @recipe
77
using Unicode
8+
using InlineStrings: InlineString15
89

910
import Dates: TimeZone, UTC
1011

src/types/fixedtimezone.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const FIXED_TIME_ZONE_REGEX = r"""
3030
A `TimeZone` with a constant offset for all of time.
3131
"""
3232
struct FixedTimeZone <: TimeZone
33-
name::String
33+
name::InlineString15
3434
offset::UTCOffset
3535
end
3636

@@ -95,3 +95,4 @@ end
9595

9696
name(tz::FixedTimeZone) = tz.name
9797
rename(tz::FixedTimeZone, name::AbstractString) = FixedTimeZone(name, tz.offset)
98+

test/types/fixedtimezone.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
@testset "FixedTimeZone" begin
2+
@test isbitstype(FixedTimeZone)
3+
24
@test FixedTimeZone("0123") == FixedTimeZone("UTC+01:23", 4980)
35
@test FixedTimeZone("+0123") == FixedTimeZone("UTC+01:23", 4980)
46
@test FixedTimeZone("-0123") == FixedTimeZone("UTC-01:23", -4980)

0 commit comments

Comments
 (0)