Add support for dd[th,nd,st,rd] Month yyyy

Incorporate PR https://github.com/araddon/dateparse/pull/128 from
https://github.com/krhubert to fix
https://github.com/araddon/dateparse/issues/127
This commit is contained in:
Klondike Dragon
2023-12-12 20:18:58 -07:00
parent c62ed15d73
commit 49f9259ee3
2 changed files with 14 additions and 0 deletions

View File

@@ -435,6 +435,12 @@ iterRunes:
p.stateDate = dateDigitChineseYear
case ',':
return p, unknownErr(datestr)
case 's', 'S', 'r', 'R', 't', 'T', 'n', 'N':
// 1st January 2018
// 2nd Jan 2018 23:59
// st, rd, nd, st
p.stateDate = dateAlphaWsMonthSuffix
i--
default:
continue
}