mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
time: small cleanup of parse_iso8601 comments, make the C.strftime declaratione forwards compatible
This commit is contained in:
parent
f3e1859ee8
commit
2c7643661e
@ -141,11 +141,11 @@ pub fn parse_format(s string, format string) !Time {
|
|||||||
return p.parse()
|
return p.parse()
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse_iso8601 parses rfc8601 time format yyyy-MM-ddTHH:mm:ss.dddddd+dd:dd as local time
|
// parse_iso8601 parses the ISO 8601 time format yyyy-MM-ddTHH:mm:ss.dddddd+dd:dd as local time.
|
||||||
// the fraction part is difference in milli seconds and the last part is offset
|
// The fraction part is difference in milli seconds, and the last part is offset from UTC time.
|
||||||
// from UTC time and can be both +/- HH:mm
|
// Both can be +/- HH:mm .
|
||||||
// remarks: not all iso8601 is supported
|
// See https://en.wikipedia.org/wiki/ISO_8601 .
|
||||||
// also checks and support for leapseconds should be added in future PR
|
// Remarks: not all of ISO 8601 is supported; checks and support for leapseconds should be added.
|
||||||
pub fn parse_iso8601(s string) !Time {
|
pub fn parse_iso8601(s string) !Time {
|
||||||
if s == '' {
|
if s == '' {
|
||||||
return error_invalid_time(0, 'datetime string is empty')
|
return error_invalid_time(0, 'datetime string is empty')
|
||||||
|
Loading…
Reference in New Issue
Block a user