Skip to content
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

Support day of year initialization and formatting #182

Closed
2 tasks done
ChristopherRabotin opened this issue Dec 2, 2022 · 0 comments
Closed
2 tasks done

Support day of year initialization and formatting #182

ChristopherRabotin opened this issue Dec 2, 2022 · 0 comments

Comments

@ChristopherRabotin
Copy link
Member

ChristopherRabotin commented Dec 2, 2022

ISO8601 allows epochs to be initialized from the day in the year. This should also be supported in Hifitime. The initialization should be trivial to implement, but the formatting may be a notch more complicated.

The formatting should be performed via its own method, independently of fmt::Display or one of the standard tokens since all of these are used already.

Hence, it's likely that a new formatting struct be needed to store the desired format.

  • Add from_day_of_year and year_days_of_year
  • Build custom formatting structure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant