Hacker News new | ask | show | jobs
by Lanzaa 1505 days ago
Something could be based on the "Rosie Pattern Language"[0]. There is already a parser for en_US/en_EU dates[1], which should be simple to extend to date ranges.

Another option would be using Tree-sitter[2]. It would be overall similar to using the Rosie Pattern Language, but Tree-sitter seems to have a more active community.

I wouldn't be surprised if one could write an automated Tree-sitter to Rosie Pattern Language translator.

[0]: https://gitlab.com/rosie-pattern-language/rosie/-/blob/maste...

[1]: https://gitlab.com/rosie-pattern-language/rosie/blob/master/...

[2]: https://tree-sitter.github.io/tree-sitter/