feat: bring existing modifier support to unixepoch #4331
+90
−44
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This change should add support for the modifiers supported for other time functions already, see #602.
Although #602 mentions
JulianDay, according to COMPAT.md and some testing that has already been implemented.Motivation and context
#602
I'm only getting started in the code base, so I'm happy to take any feedback on any best practices or SQLite quirknesses that I might be missing here. In particular I'm a bit meh on the handling of the
subseccase, let me know if you have better suggestions.FTR: I took a longer way than needed most likely, because I hadn't realized that I could just wire the existing
NaiveDateTimemanipulations to produce the right output. Do let me know if there were other reasons there to keep those apart.Description of AI Usage
Some chatting with ChatGPT about what peculiarities with Julian Days and leap seconds, I didn't know much of that stuff.
Testing
I added a few compatibility tests, happy to add more test coverage where you folks might think it makes sense.