mirror of
https://github.com/araddon/dateparse.git
synced 2025-01-19 19:26:09 +08:00
Fix ineffective break statements
This commit is contained in:
parent
01b692d1ce
commit
465140d619
@ -68,7 +68,7 @@ var (
|
|||||||
"2014-04-26",
|
"2014-04-26",
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrDateFormat = fmt.Errorf("Invalid Date Format")
|
ErrDateFormat = fmt.Errorf("invalid date format")
|
||||||
|
|
||||||
timeFormats = []string{
|
timeFormats = []string{
|
||||||
// ISO 8601ish formats
|
// ISO 8601ish formats
|
||||||
|
@ -715,7 +715,7 @@ iterRunes:
|
|||||||
// 2013年07月18日 星期四 10:27 上午
|
// 2013年07月18日 星期四 10:27 上午
|
||||||
if r == ' ' {
|
if r == ' ' {
|
||||||
p.stateDate = dateDigitChineseYearWs
|
p.stateDate = dateDigitChineseYearWs
|
||||||
break
|
break iterRunes
|
||||||
}
|
}
|
||||||
case dateDigitDot:
|
case dateDigitDot:
|
||||||
// This is the 2nd period
|
// This is the 2nd period
|
||||||
@ -1630,7 +1630,7 @@ iterRunes:
|
|||||||
if r == '=' && datestr[i-1] == 'm' {
|
if r == '=' && datestr[i-1] == 'm' {
|
||||||
p.extra = i - 2
|
p.extra = i - 2
|
||||||
p.trimExtra()
|
p.trimExtra()
|
||||||
break
|
break iterTimeRunes
|
||||||
}
|
}
|
||||||
|
|
||||||
case timePeriodWsOffsetColon:
|
case timePeriodWsOffsetColon:
|
||||||
|
Loading…
Reference in New Issue
Block a user