mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-29 09:05:30 +00:00
Suche (cont.)
This commit is contained in:
@@ -76,6 +76,28 @@ func HRDateShort(date string) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func HRDateYear(date string) string {
|
||||
xsdt, err := xsdtime.New(date)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
t := xsdt.Type()
|
||||
if t == xsdtime.GYear {
|
||||
return strconv.Itoa(xsdt.Year)
|
||||
}
|
||||
|
||||
if t == xsdtime.GYearMonth {
|
||||
return strconv.Itoa(xsdt.Year)
|
||||
}
|
||||
|
||||
if t == xsdtime.Date {
|
||||
return strconv.Itoa(xsdt.Year)
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
|
||||
func MonthName(i int) Month {
|
||||
if i > 12 || i < 1 {
|
||||
return TRANSLM[0]
|
||||
|
||||
Reference in New Issue
Block a user