Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SupplementalData ¶
type SupplementalData struct { XMLName xml.Name `xml:"supplementalData"` Text string `xml:",chardata"` Version struct { Text string `xml:",chardata"` Number string `xml:"number,attr"` } `xml:"version"` WindowsZones struct { Text string `xml:",chardata"` MapTimezones struct { Text string `xml:",chardata"` OtherVersion string `xml:"otherVersion,attr"` TypeVersion string `xml:"typeVersion,attr"` MapZone mapZones `xml:"mapZone"` } `xml:"mapTimezones"` } `xml:"windowsZones"` }
SupplementalData makes decoding the structure of the xml data found at https://github.com/unicode-org/cldr/blob/master/common/supplemental/windowsZones.xml a good deal easier with a couple of helpers for shits and giggles
func ReadSupplementalData ¶
func ReadSupplementalData(r io.Reader) (supData SupplementalData, err error)
ReadSupplementalData takes the given reader which hopefully is pointed at a xml stream, parses that xml stream and returns a SupplimentalData object
func (SupplementalData) ToOlson ¶
func (s SupplementalData) ToOlson(zoneName string) string
ToOlsen will return the "Default" Olsen type for a given Windows one
func (SupplementalData) ToWindows ¶
func (s SupplementalData) ToWindows(zoneName string) string
ToWindows will give you the Windows zone name for a given Olsen one
Click to show internal directories.
Click to hide internal directories.