Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var German = Language{ Name: "Deutsch", LangCode: "de", Now: "jetzt", Prefix: Prefix{ Negative: "vor ", Positive: "in ", }, Suffix: map[Resolution]Suffix{ Years: Suffix{ Singular: "Jahr", Plural: "Jahren", }, Months: Suffix{ Singular: "Monat", Plural: "Monaten", }, Weeks: Suffix{ Singular: "Woche", Plural: "Wochen", }, Days: Suffix{ Singular: "Tag", Plural: "Tagen", }, Hours: Suffix{ Singular: "Stunde", Plural: "Stunden", }, Minutes: Suffix{ Singular: "Minute", Plural: "Minuten", }, Seconds: Suffix{ Singular: "Sekunde", Plural: "Sekunden", }, }, Delimiter: Delimiter{ Last: " und ", Rest: ", ", }, }
View Source
var Resolutions = []Resolution{Years, Months, Weeks, Days, Hours, Minutes, Seconds}
Functions ¶
This section is empty.
Types ¶
type Language ¶
type Language struct {
Name string
LangCode string
Now string
Suffix map[Resolution]Suffix
Prefix Prefix
Delimiter Delimiter
}
func (*Language) SuffixedNumber ¶
func (l *Language) SuffixedNumber(number int64, res Resolution) string
type Resolution ¶
type Resolution uint8
const ( Years Resolution = iota Months Weeks Days Hours Minutes Seconds )
Click to show internal directories.
Click to hide internal directories.