mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
time: add documentation for remaining time-related functions and ISO 8601 parsing (#23867)
This commit is contained in:
parent
2dc5f68894
commit
a74f3171db
3 changed files with 10 additions and 0 deletions
|
@ -19,6 +19,11 @@ pub fn parse(s string) Time {
|
|||
return res
|
||||
}
|
||||
|
||||
// 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 from UTC time.
|
||||
// Both can be +/- HH:mm .
|
||||
// See https://en.wikipedia.org/wiki/ISO_8601 .
|
||||
// Remarks: not all of ISO 8601 is supported; checks and support for leapseconds should be added.
|
||||
pub fn parse_iso8601(s string) !Time {
|
||||
return parse(s)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue