Skip Menu |

This queue is for tickets about the Org-Parser CPAN distribution.

Report information
The Basics
Id: 128450
Status: resolved
Priority: 0/
Queue: Org-Parser

People
Owner: PERLANCAR [...] cpan.org
Requestors: james2vegas [...] aim.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Org::Element::Timestamp fails to parse timestamps without optional weekdays

According to https://orgmode.org/manual/Timestamps.html#DOCF60 weekday strings in timestamps are optional:

The Org date format is inspired by the standard ISO 8601 date/time format. To use an alternative format, see Custom time format. The day name is optional when you type the date yourself. However, any date inserted or modified by Org adds that day name, for reading convenience.
  However, Org::Element::Timestamp is unable to parse timestamps without the weekday part:

Can't parse timestamp string: <2018-01-07 14:00> at perl5/lib/perl5/Org/Element/Timestamp.pm line 96.

This includes the timestamp with a duration in the Org::Element::Timestamp perldoc:

Can't parse timestamp string: <2011-03-23 10:15-13:25> at perl5/lib/perl5/Org/Element/Timestamp.pm line 96.
 
On Thu, 7 Feb 2019 17:48:15 GMT, JWRIGHT wrote: Show quoted text
> According to https://orgmode.org/manual/Timestamps.html#DOCF60 weekday > strings > in timestamps are optional: > > The Org date format is inspired by the standard ISO 8601 date/time > format. To > use an alternative format, see Custom time format. The day name is > optional > when you type the date yourself. However, any date inserted or > modified by Org > adds that day name, for reading convenience. > > However, Org::Element::Timestamp is unable to parse timestamps without > the > weekday part: > > Can't parse timestamp string: <2018-01-07 14:00> at > perl5/lib/perl5/Org/Element/Timestamp.pm line 96. > > This includes the timestamp with a duration in the > Org::Element::Timestamp > perldoc: > > Can't parse timestamp string: <2011-03-23 10:15-13:25> at > perl5/lib/perl5/Org/Element/Timestamp.pm line 96.
IIRC from several years ago, the weekday abbreviated name was mandatory when there is time of day (but I was testing from using the org-mode in Emacs and seeing how it highlights the timestamp, instead of actually reading the spec). It's great if it's now optional since that was one of my pet peeves also. Fixed in e68970a, thanks.