v0.0.569
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m30s
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m30s
This commit is contained in:
68
timeext/month.go
Normal file
68
timeext/month.go
Normal file
@@ -0,0 +1,68 @@
|
||||
package timeext
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
func MonthNameGermanShort3(v time.Month) string {
|
||||
switch v {
|
||||
case time.January:
|
||||
return "Jan"
|
||||
case time.February:
|
||||
return "Feb"
|
||||
case time.March:
|
||||
return "Mär"
|
||||
case time.April:
|
||||
return "Apr"
|
||||
case time.May:
|
||||
return "Mai"
|
||||
case time.June:
|
||||
return "Jun"
|
||||
case time.July:
|
||||
return "Jul"
|
||||
case time.August:
|
||||
return "Aug"
|
||||
case time.September:
|
||||
return "Sep"
|
||||
case time.October:
|
||||
return "Okt"
|
||||
case time.November:
|
||||
return "Nov"
|
||||
case time.December:
|
||||
return "Dez"
|
||||
default:
|
||||
return fmt.Sprintf("%%!Month(%d)", v)
|
||||
}
|
||||
}
|
||||
|
||||
func MonthNameGermanLong(v time.Month) string {
|
||||
switch v {
|
||||
case time.January:
|
||||
return "Januar"
|
||||
case time.February:
|
||||
return "Februar"
|
||||
case time.March:
|
||||
return "März"
|
||||
case time.April:
|
||||
return "April"
|
||||
case time.May:
|
||||
return "Mai"
|
||||
case time.June:
|
||||
return "Juni"
|
||||
case time.July:
|
||||
return "Juli"
|
||||
case time.August:
|
||||
return "August"
|
||||
case time.September:
|
||||
return "September"
|
||||
case time.October:
|
||||
return "Oktober"
|
||||
case time.November:
|
||||
return "November"
|
||||
case time.December:
|
||||
return "Dezember"
|
||||
default:
|
||||
return fmt.Sprintf("%%!Month(%d)", v)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user