mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
time: fix parse_format
with YY
(#18887)
This commit is contained in:
@ -163,7 +163,7 @@ fn (mut p DateTimeParser) parse() !Time {
|
||||
}
|
||||
}
|
||||
'YY' {
|
||||
year_ = p.must_be_int(2) or {
|
||||
year_ = now().year / 100 * 100 + p.must_be_int(2) or {
|
||||
return error_invalid_time(0, 'end of string reached before the full year was specified')
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user