emancu/toml-rb

Can't parse date without the local offset and the time

Closed this issue · 0 comments

znz commented

https://github.com/toml-lang/toml/tree/3968af5460e176f1fa14f199af83de03f70cde95#datetime says You may omit the local offset and let the parser or host application decide that information. and If you only care about the day, you can omit the local offset and the time, letting the parser or host application decide both.
But toml-rb cannot parse without the local offset, and without the local offset and the time.

% gem install toml-rb
Fetching: citrus-3.0.2.gem (100%)
Successfully installed citrus-3.0.2
Fetching: toml-rb-0.3.10.gem (100%)
Successfully installed toml-rb-0.3.10
2 gems installed
% rbenv exec irb -r irb/completion --simple-prompt
>> require 'toml'
=> true
>> TOML.parse('date = 1979-05-27')
TOML::ParseError: Failed to parse input on line 1 at offset 17
date = 1979-05-27
                 ^