Updated times.parse() documentation
This commit is contained in:
parent
434c27343e
commit
0ffd14e169
1 changed files with 6 additions and 3 deletions
|
|
@ -1138,8 +1138,11 @@ proc parseToken(info: var TimeInfo; token, value: string; j: var int) =
|
||||||
j += token.len
|
j += token.len
|
||||||
|
|
||||||
proc parse*(value, layout: string): TimeInfo =
|
proc parse*(value, layout: string): TimeInfo =
|
||||||
## This function parses a date/time string using the standard format identifiers (below)
|
## This function parses a date/time string using the standard format
|
||||||
## The function defaults information not provided in the format string from the running program (timezone, month, year, etc)
|
## identifiers as listed below. The function defaults information not provided
|
||||||
|
## in the format string from the running program (timezone, month, year, etc).
|
||||||
|
## Daylight saving time is only set if no timezone is given and the given date
|
||||||
|
## lies within the DST period of the current locale.
|
||||||
##
|
##
|
||||||
## ========== ================================================================================= ================================================
|
## ========== ================================================================================= ================================================
|
||||||
## Specifier Description Example
|
## Specifier Description Example
|
||||||
|
|
@ -1164,7 +1167,7 @@ proc parse*(value, layout: string): TimeInfo =
|
||||||
## tt Same as above, but ``AM`` and ``PM`` instead of ``A`` and ``P`` respectively.
|
## tt Same as above, but ``AM`` and ``PM`` instead of ``A`` and ``P`` respectively.
|
||||||
## yy Displays the year to two digits. ``2012 -> 12``
|
## yy Displays the year to two digits. ``2012 -> 12``
|
||||||
## yyyy Displays the year to four digits. ``2012 -> 2012``
|
## yyyy Displays the year to four digits. ``2012 -> 2012``
|
||||||
## z Displays the timezone offset from UTC. ``GMT+7 -> +7``, ``GMT-5 -> -5``
|
## z Displays the timezone offset from UTC. ``Z`` is parsed as ``+0`` ``GMT+7 -> +7``, ``GMT-5 -> -5``
|
||||||
## zz Same as above but with leading 0. ``GMT+7 -> +07``, ``GMT-5 -> -05``
|
## zz Same as above but with leading 0. ``GMT+7 -> +07``, ``GMT-5 -> -05``
|
||||||
## zzz Same as above but with ``:mm`` where *mm* represents minutes. ``GMT+7 -> +07:00``, ``GMT-5 -> -05:00``
|
## zzz Same as above but with ``:mm`` where *mm* represents minutes. ``GMT+7 -> +07:00``, ``GMT-5 -> -05:00``
|
||||||
## ========== ================================================================================= ================================================
|
## ========== ================================================================================= ================================================
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue