Skip to content

Datetime traits #207

Open
Open
@David-OConnor

Description

@David-OConnor

What are your thoughts on Datetime, Time, Date etc traits? They seem like a good fit because they're not available natively on no_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) or ds323x::DateTime (eg ds3231).

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions