Implement more time-related functions#283
Conversation
|
Hi @dnelson-1901, this looks already very promising --- thanks a lot for your effort. I will make a few changes. |
|
After looking through this, I'm already quite happy with the general state. Great work! |
|
How about this? It's using a the deprecated Using |
|
Scratch that - I just found |
|
Thanks @dnelson-1901 for your |
|
Oh, nothing like that.. I was wrestling with simple things like trying to get the right types into the right structures so the function would compile, and didn't realize the expression could be simplified when I was done. Thanks for cleaning up my novice Rust code :) |
I see; thanks for the clarification!
You're very welcome! I hope that you learnt the one or other bit. ;) |
This PR adds support for strptime, strftime, strflocaltime, mktime, gmtime, and localtime .
I'm mainly a C developer and know very little Rust so you could treat this more as a proof of concept rather than committable code. It feels like there's too much casting of types but maybe that's just rust? All of the functions do work, though, and pass the relevant tests in jq's jq.test and optional.test files.