News for hackers. Stuff that matters.
Re:Quickadd: A Python library for extracting date and time f... by tagy on Tuesday November 22, 2022 @10:44AM (#33706961)
I used chrono[1] for my side project and I was struggling with recurrence, nice to see someone is solving it, looks neat!

[1] https://github.com/wanasit/chrono

Re:Quickadd: A Python library for extracting date and time f... by eternityforest on Thursday November 24, 2022 @05:03AM (#33729552)
Natural language recurrence is probably the #1 hardest algorithm I have ever worked with.

I used TatSu and a PEG grammer to compile down to a set of constraint objects(Like daily or at 3pm or on the 3rd of the month) that can basically be asked "When is the next match after X" until they all just return X, and you know you have a match.

Re:Quickadd: A Python library for extracting date and time f... by slavoglinsky on Tuesday November 22, 2022 @01:29PM (#33709146)
This looks great. The base ctparse lib looks also capable.
Re:Quickadd: A Python library for extracting date and time f... by memco on Tuesday November 22, 2022 @02:29PM (#33710133)
Much more robust than my approach of throwing a common set of formats at a string and every substring thereof until I get a datetime object back or the substring is too short to produce a usable date.
Re:Quickadd: A Python library for extracting date and time f... by abdullahkhalids on Tuesday November 22, 2022 @04:37PM (#33711880)
I am not happy with the one in Thunderbird. It works most of the time, but sometimes it is completely off.

This one look like it will handle some of the cases that Thunderbird misses.