Documentation ¶
Index ¶
Constants ¶
View Source
const ( ShortDay = 1 << iota LongDay DayNumber ShortMonth LongMonth MonthNumber Year Time // Return also the time )
These constants permit to specify which fields (and their string representation !) the user wants
View Source
const ( BasicDate = LongDay | DayNumber | LongMonth | Year NumericalDate = DayNumber | MonthNumber | Year )
Constants defining usual representations
View Source
const (
PadNumerics = 1 << iota // When used with `NumericalDate` flag day and month will be padded with `0` if necessary
)
Options that trigger special behaviors when used in conjunction with others flags
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LangMonth ¶
type LangMonth string
LangMonth is a string representing a day in a foreign language
type Translator ¶
Translator is the structure containing the months and days slices for a given language
func NewEnglishTranslator ¶
func NewEnglishTranslator() *Translator
NewEnglishTranslator returns a *Translator with the english days and months
func NewFrenchTranslator ¶
func NewFrenchTranslator() *Translator
NewFrenchTranslator returns a *Translator with the french days and months
func NewTranslator ¶
func NewTranslator(lang string) (*Translator, error)
NewTranslator returns a translator corresponding to a given language or an error if this language is unavailable
Click to show internal directories.
Click to hide internal directories.