-
Notifications
You must be signed in to change notification settings - Fork 229
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
Datetime traits #207
Comments
That's awesome; had no idea. Your crate is in line with what I was proposing. |
I'm currently implementing the trait for the |
Think I should PR |
Btw, looking fwd to your |
Ok, I just published version 0.3 of the ds323x driver crate which implements the I am unsure whether chrono-based methods for Whether |
Thoughts on getting |
@David-OConnor I'm glad to hear that. |
What are your thoughts on
Datetime
,Time
,Date
etc traits? They seem like a good fit because they're not available natively onno_std
, are a common feature. It would be nice to be able to write general functions using these traits, instead of platform-specific ones.Ie, make it so you don't have to hard-code functions to accept
chrono::Datetime
(eg a computer) ords323x::DateTime
(egds3231
).This feels higher-level than existing traits, but I'd argue it fits well with the concept of code portability across devices, which is a big (the main?) draw of this project. I we can currently write device-agnostic code using
InputPin
, but not dates/times/datetimes.If y'all like it, I'll draft a PR.
The text was updated successfully, but these errors were encountered: