mirror of
https://gitee.com/johng/gf.git
synced 2024-12-01 11:48:09 +08:00
Merge pull request #1154 from gouguoyin/master
formatMonthDaySuffixMap() misjudged suffix
This commit is contained in:
commit
930e63e6b9
@ -266,11 +266,11 @@ func formatToRegexPattern(format string) string {
|
||||
// formatMonthDaySuffixMap returns the short english word for current day.
|
||||
func formatMonthDaySuffixMap(day string) string {
|
||||
switch day {
|
||||
case "01":
|
||||
case "01", "21", "31":
|
||||
return "st"
|
||||
case "02":
|
||||
case "02", "22":
|
||||
return "nd"
|
||||
case "03":
|
||||
case "03", "23":
|
||||
return "rd"
|
||||
default:
|
||||
return "th"
|
||||
|
Loading…
Reference in New Issue
Block a user