ts.el icon indicating copy to clipboard operation
ts.el copied to clipboard

ISO 8601 parse failure?

Open andapony opened this issue 5 years ago • 3 comments

Looks like something is screwy with the ISO 8601 parsing:

(ts-format (ts-parse "2016-12-01T23:35:06-05:00"))
"-001-11-30 00:00:00 -0752"

I'm using version 20191010.210 of the ts package, on Emacs 27.1 on MacOS.

andapony avatar Aug 21 '20 20:08 andapony

Please see https://github.com/alphapapa/ts.el/pull/15

alphapapa avatar Aug 21 '20 21:08 alphapapa

Please see #15

Thanks, I've added some discussion on that pull request. Perhaps ts-parse should return some kind of error indication for the formats that it's unable to handle properly.

andapony avatar Aug 22 '20 16:08 andapony

The parsing provided by this library is intended to be a thin wrapper around Emacs's own parsing functions, so users who need validation should check the returned values. Signaling an error could cause unexpected failures in programs that use this library.

alphapapa avatar Aug 22 '20 17:08 alphapapa