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

Add DateTime Extensions methods #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

WaldemarKaib
Copy link

There are several extensions methods for the DateTime struct we use in our project. These might be handy for others as well.
We asked ourselves which method we would use in a second project and before copying them or creating a nuget package, integrating these methods into Arc4u seems a good way.

Extensions methods:

  • GetFirstHourOfDay
  • GetLastHourOfDay
  • GetEndOfDay
  • EachHour
  • GetTotalHoursOfDay
  • TruncateMilliseconds

- GetFirstHourOfDay
- GetLastHourOfDay
- GetEndOfDay
- EachHour
- GetTotalHoursOfDay
- TruncateMilliseconds
@rdarko
Copy link
Collaborator

rdarko commented Mar 29, 2023

We arent able to see the value of having such methods to support a handful of projects. We also need to take DateTimeOffset into account, because we need to provide the same method here (for simetry) and we also need to investigate how it combines to DateOnly and TimeOnly types introduced in .net 6. Although a good suggestion, for the time being, such dateTime support isnt on the roadmap of arc4u.

@rdarko rdarko added question Further information is requested help wanted Extra attention is needed and removed question Further information is requested help wanted Extra attention is needed labels Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants