toml-node icon indicating copy to clipboard operation
toml-node copied to clipboard

Local time not supported

Open thisdavej opened this issue 6 years ago • 3 comments

Per the TOML local time spec, the following expressions should parse:

lt1 = 07:32:00
lt2 = 00:32:00.999999

I receive the following error:

      throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos);
      ^
SyntaxError: Expected "#", ".", "E", "\n", "\r", "_", "e", [ \t] or [0-9] but ":" found.

thisdavej avatar Jan 27 '18 22:01 thisdavej

Agree, I this it's necessary.

lightme16 avatar Feb 24 '18 20:02 lightme16

This is a 0.5.0 feature, and docs say "toml-node supports version 0.4.0 the TOML spec". (This is a little confusing because there are some 0.5.0 features that are supported, like literal strings as keys.)

iarna avatar Jul 27 '18 07:07 iarna

Relatedly, the TOML spec allows replacing the T in a datetime like 2021-02-07T23:00:00-08:00 with a space for readability (as does the RFC 3339 spec). Granted, this is also a 0.5.0 feature.

But at the same time, v0.5.0 was released more than two years ago; we are now at v1.0.0. It kind of seems like this project is dead or something, despite being the "standard" JS TOML package.

kwshi avatar Feb 08 '21 07:02 kwshi