mirror of
https://github.com/araddon/dateparse.git
synced 2025-09-18 04:48:17 +08:00
Update example and README.md with new formats
Audited all test cases to make sure an example was listed for all known formats.
This commit is contained in:
14
parseany.go
14
parseany.go
@@ -638,9 +638,9 @@ iterRunes:
|
||||
|
||||
// Must be a valid short or long month
|
||||
if p.molen == 3 {
|
||||
p.set(p.moi, "Jan")
|
||||
p.yeari = i + 1
|
||||
p.stateDate = dateDigitDashAlphaDash
|
||||
p.set(p.moi, "Jan")
|
||||
p.yeari = i + 1
|
||||
p.stateDate = dateDigitDashAlphaDash
|
||||
} else {
|
||||
possibleFullMonth := strings.ToLower(p.datestr[p.moi:(p.moi + p.molen)])
|
||||
if i > 3 && isMonthFull(possibleFullMonth) {
|
||||
@@ -1157,10 +1157,10 @@ iterRunes:
|
||||
}
|
||||
case ' ':
|
||||
if p.daylen == 0 && p.molen > 0 && p.yearlen > 0 {
|
||||
p.daylen = i - p.dayi
|
||||
if !p.setDay() {
|
||||
return p, p.unknownErr(datestr)
|
||||
}
|
||||
p.daylen = i - p.dayi
|
||||
if !p.setDay() {
|
||||
return p, p.unknownErr(datestr)
|
||||
}
|
||||
} else if p.molen == 0 && p.daylen > 0 && p.yearlen > 0 {
|
||||
p.molen = i - p.moi
|
||||
if !p.setMonth() {
|
||||
|
Reference in New Issue
Block a user