HarptosTimeFormatter
public class HarptosTimeFormatter
Use the HarptosTimeFormatter
to format instances of HarptosTime
, the following patterns can
be used:
- YYYY: the year, e.g.: 909
- Y: the long name of the year, e.g.: “The Year of the Ogre” for 909 DR
- M: the month number, through 1 - 12
- MM: the month number, through 01 - 12
- MMM: the full of the month / festival, e.g.: Tarsakh for the 4th Month or Midwinter for the festival the day after Hammer 30
- dd: the day of the month, through 01 - 30
- d: the day of the month, though 1 - 30
- hh: the hour, through 00 - 23
- h: the hour, through 0 - 23
- mm: the minute, through 00 - 59
- m: the minute, through 0 - 59
- ss: the second, through 00 - 59
- s: the second, through 0 - 59 Values between single quotes will be ignored
-
The constructor
Declaration
Swift
public init(monthFormat: String, festivalFormat: String)
Parameters
monthFormat
A format string for months
festivalFormat
A format string for festivals
-
Return a formatted string for a given
HarptosTime
Declaration
Swift
public func string(from time: HarptosTime) -> String
Parameters
time
The time to be formatted