about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorSteven Fackler <sfackler@gmail.com>2013-09-05 23:13:02 -0700
committerSteven Fackler <sfackler@gmail.com>2013-09-05 23:19:41 -0700
commit3c30ecb706dc32257d1ec6bdcb0c88eb924483dd (patch)
treed86421c6b40f9f4e67f35c8d80d4a52ee791459f /src/libsyntax/parse
parenta980f28028f4712efbb89017bd23c25183fddbfe (diff)
downloadrust-3c30ecb706dc32257d1ec6bdcb0c88eb924483dd.tar.gz
rust-3c30ecb706dc32257d1ec6bdcb0c88eb924483dd.zip
Add fractional second support to str{p,f}time
The ISO 8601 standard does not mandate any specific precision for
fractional seconds, so this accepts input of any length, ignoring the
part after the nanoseconds place. It may be more correct to round with
the tenths of nanoseconds digit, but then we'd have to deal with
carrying the round through the entire Tm struct (e.g. for a time like
Dec 31 11:59.999999999999).

%f is the format specifier that Python's datetime library uses for
0-padded microseconds so it seemed appropriate here.

cc #2350
Diffstat (limited to 'src/libsyntax/parse')
0 files changed, 0 insertions, 0 deletions