Skip to content

Commit

Permalink
time: change must_be_valid_week_day() output
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffangelion committed Aug 8, 2024
1 parent 845f240 commit 19ac983
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vlib/time/date_time_parser.v
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ fn (mut p DateTimeParser) must_be_valid_three_letter_month() !int {
return error_invalid_time(0, 'invalid three letter month, at: ${p.current_pos_datetime}')
}

fn (mut p DateTimeParser) must_be_valid_week_day() !int {
fn (mut p DateTimeParser) must_be_valid_week_day() !string {
for v in long_days {
if p.current_pos_datetime + v.len < p.datetime.len {
weekday := p.datetime[p.current_pos_datetime..p.current_pos_datetime + v.len]
if v == weekday {
p.current_pos_datetime += v.len
return long_days.index(weekday) + 1
return weekday
}
}
}
Expand Down

0 comments on commit 19ac983

Please sign in to comment.