Skip to content

Commit

Permalink
Update to use TZFile in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
omus committed Jun 17, 2022
1 parent 4ed324b commit c4f36c8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/src/api-private.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,18 @@ TimeZones.first_valid
TimeZones.last_valid
```

## TZFile

```@docs
TZFile.read
TZFile.write
```

## Etc.

```@docs
TimeZones.UTCOffset
TimeZones.@optional
TimeZones.read_tzfile
TimeZones.parse_tz_format
TimeZones.tryparse_tz_format
hash(::ZonedDateTime, ::UInt)
Expand Down
8 changes: 8 additions & 0 deletions src/tzfile/write.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ function _combine_designations(abbrs::AbstractVector{<:AbstractString})
return result, indices
end

"""
TZFile.write(io::IO, tz::TimeZone; version::Char=TZFile.WRITE_VERSION)
Writes the time zone to the I/O stream in the
[POSIX tzfile](https://data.iana.org/time-zones/data/tzfile.5.txt) format.
"""
function write end

function write(io::IO, tz::FixedTimeZone; version::Char=WRITE_VERSION)
combined_designation, designation_indices = combine_designations([tz.name])

Expand Down

0 comments on commit c4f36c8

Please sign in to comment.