This commit is contained in:
dpurbosakti
2025-11-25 15:52:07 +07:00
parent 250b446c37
commit 8cf750c63f
8 changed files with 305 additions and 131 deletions
+10
View File
@@ -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
}