time
Currently the implementation is n_time module . The following is its doc:
Warning:
A few of the format directives for strftime/strptime are not supported, and using them causes AssertDefect. They are listed in nstrfptime.NotImplDirectives
Hint:
Some directives (only for strftime) whose implementents are platform-depend in CPython are always supported here: '%V' '%G' '%g'
Consts
DefaultTimeFormat = "%a %b %d %H:%M:%S %Y"
- Source Edit
Procs
proc strptime(s: PyStr; format = DefaultTimeFormat): struct_time {. ...raises: [ValueError, TimeParseError, TimeFormatParseError], tags: [TimeEffect], forbids: [].}
-
Warning: In current implementation, whitespace in format string means itself AS-IS, unlike C or Python, where any whitespace means a serial of any whitespaces. If really wanting the behavior of C's, consider using std/strscan.Warning: Current strptime is just locale-unaware, when it comes to "the locale's format", like "%x", it always uses the format of "C" locale, no matter what the locale is. a.k.a. Changing locale via C's api in <locale.h> doesn't affect this function.Source Edit