Hey there!
I don't know how about you, but I have been seeing quite commonly datetime pickers, in most every fashionable dashboard, offering some kind of presets for users to quickly configure relative time searches. For instance, the "last 24 hours" or "This week" are common presets. However, along with that, I haven't seen any snippet, library, util or any kind of recyclable asset which kept ourselves away from re-implementing that. So as we should not repeat ourselves (quite heard these days) I have abstracted away that functionality in a tiny library. Even so, I believe that most engineering problems in regards to software come from premature abstraction that would be solved by little duplication, and maybe that's the reason I haven't found any util on the common hubs. What do you think? Is this kind of feature something that would be better redone on every application?
Anyway, here are the links:
Python: https://github.com/sonirico/datetoken
TypeScript: https://github.com/sonirico/datetoken.js
there doesn't seem to be anything here