wip
This commit is contained in:
@@ -208,3 +208,13 @@ func GetLastTwoPathSegments(s string) string {
|
||||
// fallback: return entire string if less than 2 segments
|
||||
return strings.Trim(path, "/")
|
||||
}
|
||||
|
||||
func FormatPlaceAndDate(place string, t time.Time) string {
|
||||
// Ensure place is uppercase
|
||||
place = strings.ToUpper(strings.TrimSpace(place))
|
||||
|
||||
// Format date: DD-MM-YYYY
|
||||
dateStr := t.Format("02-01-2006")
|
||||
|
||||
return place + ", " + dateStr
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user