Skip to content

Commit

Permalink
fixup! Deprecate Dates.default_format
Browse files Browse the repository at this point in the history
  • Loading branch information
omus committed Jan 31, 2025
1 parent 8b42414 commit 4f6add7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/deprecated.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Base: @deprecate
using Base: @deprecate, depwarn

# BEGIN TimeZones 1.0 deprecations

Expand All @@ -15,7 +15,7 @@ const TransitionTimeInfo = TZFile.TransitionTimeInfo

function Dates.default_format(::Type{ZonedDateTime})
depwarn(
"`$(Dates.default_format)(ZonedDateTime)` is deprecated and has direct " *
"`Dates.default_format(ZonedDateTime)` is deprecated and has no direct " *
"replacement. Consider using refactoring to use " *
"`parse(::Type{ZonedDateTime}, ::AbstractString)` as an alternative.",
:default_format,
Expand Down
2 changes: 1 addition & 1 deletion test/deprecated.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@testset "default format" begin
@test default_format(ZonedDateTime) === TimeZones.ISOZonedDateTimeFormat
@test Dates.default_format(ZonedDateTime) === TimeZones.ISOZonedDateTimeFormat
end
2 changes: 1 addition & 1 deletion test/parse.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Dates: parse_components, Millisecond
using Dates: parse_components
using TimeZones: ParseNextError, _parsesub_tzabbr, _parsesub_offset, _parsesub_time, _parsesub_tzdate, _parsesub_tz

@testset "parse" begin
Expand Down

0 comments on commit 4f6add7

Please sign in to comment.