Skip to content

Commit 3a32cbb

Browse files
committed
All of these did nothing
1 parent bf3a5b3 commit 3a32cbb

1 file changed

Lines changed: 0 additions & 33 deletions

File tree

parseany.go

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -383,9 +383,6 @@ iterRunes:
383383
}
384384

385385
case ' ':
386-
for i+1 < len(datestr) && datestr[i+1] == ' ' {
387-
i++
388-
}
389386
// 18 January 2018
390387
// 8 January 2018
391388
// 8 jan 2018
@@ -449,9 +446,6 @@ iterRunes:
449446
p.stateDate = dateYearDashDashOffset
450447
p.setDay()
451448
case ' ':
452-
for i+1 < len(datestr) && datestr[i+1] == ' ' {
453-
i++
454-
}
455449
p.daylen = i - p.dayi
456450
p.stateDate = dateYearDashDashWs
457451
p.stateTime = timeStart
@@ -512,9 +506,6 @@ iterRunes:
512506
// 29-Jun-2016 dd-month(alpha)-yyyy
513507
switch r {
514508
case ' ':
515-
for i+1 < len(datestr) && datestr[i+1] == ' ' {
516-
i++
517-
}
518509
// we need to find if this was 4 digits, aka year
519510
// or 2 digits which makes it ambiguous year/day
520511
length := i - (p.moi + p.molen + 1)
@@ -548,9 +539,6 @@ iterRunes:
548539

549540
switch r {
550541
case ' ':
551-
for i+1 < len(datestr) && datestr[i+1] == ' ' {
552-
i++
553-
}
554542
fallthrough
555543
case ':':
556544
p.stateTime = timeStart
@@ -581,9 +569,6 @@ iterRunes:
581569
// We aren't breaking because we are going to re-use this case
582570
// to find where the date starts, and possible time begins
583571
case ' ':
584-
for i+1 < len(datestr) && datestr[i+1] == ' ' {
585-
i++
586-
}
587572
fallthrough
588573
case ':':
589574
p.stateTime = timeStart
@@ -623,9 +608,6 @@ iterRunes:
623608
// Note no break, we are going to pass by and re-enter this dateDigitSlash
624609
// and look for ending (space) or not (just date)
625610
case ' ':
626-
for i+1 < len(datestr) && datestr[i+1] == ' ' {
627-
i++
628-
}
629611
p.stateTime = timeStart
630612
if p.yearlen == 0 {
631613
p.yearlen = i - p.yeari
@@ -647,9 +629,6 @@ iterRunes:
647629

648630
switch r {
649631
case ' ':
650-
for i+1 < len(datestr) && datestr[i+1] == ' ' {
651-
i++
652-
}
653632
p.stateTime = timeStart
654633
if p.yearlen == 0 {
655634
p.yearlen = i - p.yeari
@@ -687,9 +666,6 @@ iterRunes:
687666
// 12 Feb 2006, 19:17:22
688667
switch r {
689668
case ' ':
690-
for i+1 < len(datestr) && datestr[i+1] == ' ' {
691-
i++
692-
}
693669
p.yeari = i + 1
694670
//p.yearlen = 4
695671
p.dayi = 0
@@ -724,9 +700,6 @@ iterRunes:
724700
i++
725701
break iterRunes
726702
case ' ':
727-
for i+1 < len(datestr) && datestr[i+1] == ' ' {
728-
i++
729-
}
730703
p.yearlen = i - p.yeari
731704
p.setYear()
732705
break iterRunes
@@ -741,9 +714,6 @@ iterRunes:
741714
// weekday %Y年%m月%e日 %A %I:%M %p
742715
// 2013年07月18日 星期四 10:27 上午
743716
if r == ' ' {
744-
for i+1 < len(datestr) && datestr[i+1] == ' ' {
745-
i++
746-
}
747717
p.stateDate = dateDigitChineseYearWs
748718
break
749719
}
@@ -804,9 +774,6 @@ iterRunes:
804774
case r == ' ':
805775
// X
806776
// April 8, 2009
807-
for i+1 < len(datestr) && datestr[i+1] == ' ' {
808-
i++
809-
}
810777
if i > 3 {
811778
// Check to see if the alpha is name of month? or Day?
812779
month := strings.ToLower(datestr[0:i])

0 commit comments

Comments
 (0)