All of these did nothing

This commit is contained in:
Arran Ubels 2023-02-15 16:28:56 +11:00
parent bf3a5b3040
commit 3a32cbb3d2
No known key found for this signature in database
GPG Key ID: 135EDC7B21D17F48

View File

@ -383,9 +383,6 @@ iterRunes:
} }
case ' ': case ' ':
for i+1 < len(datestr) && datestr[i+1] == ' ' {
i++
}
// 18 January 2018 // 18 January 2018
// 8 January 2018 // 8 January 2018
// 8 jan 2018 // 8 jan 2018
@ -449,9 +446,6 @@ iterRunes:
p.stateDate = dateYearDashDashOffset p.stateDate = dateYearDashDashOffset
p.setDay() p.setDay()
case ' ': case ' ':
for i+1 < len(datestr) && datestr[i+1] == ' ' {
i++
}
p.daylen = i - p.dayi p.daylen = i - p.dayi
p.stateDate = dateYearDashDashWs p.stateDate = dateYearDashDashWs
p.stateTime = timeStart p.stateTime = timeStart
@ -512,9 +506,6 @@ iterRunes:
// 29-Jun-2016 dd-month(alpha)-yyyy // 29-Jun-2016 dd-month(alpha)-yyyy
switch r { switch r {
case ' ': case ' ':
for i+1 < len(datestr) && datestr[i+1] == ' ' {
i++
}
// we need to find if this was 4 digits, aka year // we need to find if this was 4 digits, aka year
// or 2 digits which makes it ambiguous year/day // or 2 digits which makes it ambiguous year/day
length := i - (p.moi + p.molen + 1) length := i - (p.moi + p.molen + 1)
@ -548,9 +539,6 @@ iterRunes:
switch r { switch r {
case ' ': case ' ':
for i+1 < len(datestr) && datestr[i+1] == ' ' {
i++
}
fallthrough fallthrough
case ':': case ':':
p.stateTime = timeStart p.stateTime = timeStart
@ -581,9 +569,6 @@ iterRunes:
// We aren't breaking because we are going to re-use this case // We aren't breaking because we are going to re-use this case
// to find where the date starts, and possible time begins // to find where the date starts, and possible time begins
case ' ': case ' ':
for i+1 < len(datestr) && datestr[i+1] == ' ' {
i++
}
fallthrough fallthrough
case ':': case ':':
p.stateTime = timeStart p.stateTime = timeStart
@ -623,9 +608,6 @@ iterRunes:
// Note no break, we are going to pass by and re-enter this dateDigitSlash // Note no break, we are going to pass by and re-enter this dateDigitSlash
// and look for ending (space) or not (just date) // and look for ending (space) or not (just date)
case ' ': case ' ':
for i+1 < len(datestr) && datestr[i+1] == ' ' {
i++
}
p.stateTime = timeStart p.stateTime = timeStart
if p.yearlen == 0 { if p.yearlen == 0 {
p.yearlen = i - p.yeari p.yearlen = i - p.yeari
@ -647,9 +629,6 @@ iterRunes:
switch r { switch r {
case ' ': case ' ':
for i+1 < len(datestr) && datestr[i+1] == ' ' {
i++
}
p.stateTime = timeStart p.stateTime = timeStart
if p.yearlen == 0 { if p.yearlen == 0 {
p.yearlen = i - p.yeari p.yearlen = i - p.yeari
@ -687,9 +666,6 @@ iterRunes:
// 12 Feb 2006, 19:17:22 // 12 Feb 2006, 19:17:22
switch r { switch r {
case ' ': case ' ':
for i+1 < len(datestr) && datestr[i+1] == ' ' {
i++
}
p.yeari = i + 1 p.yeari = i + 1
//p.yearlen = 4 //p.yearlen = 4
p.dayi = 0 p.dayi = 0
@ -724,9 +700,6 @@ iterRunes:
i++ i++
break iterRunes break iterRunes
case ' ': case ' ':
for i+1 < len(datestr) && datestr[i+1] == ' ' {
i++
}
p.yearlen = i - p.yeari p.yearlen = i - p.yeari
p.setYear() p.setYear()
break iterRunes break iterRunes
@ -741,9 +714,6 @@ iterRunes:
// weekday %Y年%m月%e日 %A %I:%M %p // weekday %Y年%m月%e日 %A %I:%M %p
// 2013年07月18日 星期四 10:27 上午 // 2013年07月18日 星期四 10:27 上午
if r == ' ' { if r == ' ' {
for i+1 < len(datestr) && datestr[i+1] == ' ' {
i++
}
p.stateDate = dateDigitChineseYearWs p.stateDate = dateDigitChineseYearWs
break break
} }
@ -804,9 +774,6 @@ iterRunes:
case r == ' ': case r == ' ':
// X // X
// April 8, 2009 // April 8, 2009
for i+1 < len(datestr) && datestr[i+1] == ' ' {
i++
}
if i > 3 { if i > 3 {
// Check to see if the alpha is name of month? or Day? // Check to see if the alpha is name of month? or Day?
month := strings.ToLower(datestr[0:i]) month := strings.ToLower(datestr[0:i])