-
Notifications
You must be signed in to change notification settings - Fork 4
Proper time
support
#6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Additionally, probably closes #5. |
I'll add that the features are currently exclusive, however that could probably be solved. |
Hello, thanks for your contribution. I have little time right now, but I will review your PR as soon as I can. Btw: I tried to build using
I might add a compile time check to help future devs diagnose the issue. Thanks again, I'll get back to you ASAP. |
Yeah, I mentioned that they're currently mutually exclusive in my previous comment. I can try and work on a less hacky version when I've got more time, I threw this together because I needed it (and use |
Hey folks, I got heavily inspired by your approach of using PEST files. The lib will offer more than just parsing human date strings, but I wonder if you want that multi-lang support as well? Best regards P.S.: If you want, I can open an issue, combined with a PR 👍 |
@lyssieth Thanks again for putting this together, I really appreciate. It seems "features" should be I am wondering whether we could make sure that either or both I guess the default could be |
Sounds good, yeah. I can separate the apis into their own modules, probably today or tomorrow depending on how time goes. |
Oh, would it be okay if I fix all the lints as well? (ofc ensuring nothing breaks) There's 30 warnings with |
Yes, of course, thanks for helping me out. It used to be clean but clippy is now stricter 😅 |
Big commit, but here I go: - Removed the separate functions in favor of `unified` mod - Upgraded dependencies, bumped edition, fixed all the lints - Fixed any errors that popped up - Treat all time as UTC, enforced in unified This likely requires some more testing before being merged, like how extreme numbers are handled
Got a wee bit carried away, heh |
It could probably use a good round of documentation |
@lyssieth : FYI I am currently reading the new implementation. I would like to make sure that all commands below compile the crate:
Unifying time and chrono API sounds good to me. I am wondering whether it is possible to define a trait in place of DateTime enum so that we can keep most of the code the same regardless of the backend. Each backend ( IMO it is ok to provide one top level API for each backend ( Both backend should be conditionally compiled based on selected features. |
In theory a trait is possible, however might make passing values around a bit strange, might experiment a bit once free. |
I also forgot to feature flag some things, sorry about that :> |
Thanks for your latest commit, it seems to work with both Maybe we should declare the unified enum as non exhaustive in case we need to support another backend someday? I gave the "trait approach" a try and it is really not straightforward, I would rather stick to how you did it so far, it looks a lot more manageable ^^' |
Done!
Agreed. There's documentation that needs doing (something I'm personally bad at), and probably some more testing? |
chrono
andtime
features, both enabled by defaulttime
crateIt's rather hacky, but it seems to work just fine.