Using NodaTime How do I calculate the number of minutes between two datetimes while factoring in business hours and timezone?

30 Views Asked by At

The NodaTime library makes it much easier to work with dates and times but I can't figure out how to calculate the number of minutes between two dates while accounting for business hours and time zone using NodaTime. here's an example (note my start and end date are always stored as UTC, but the business hours can be any time zone):

Start: 2024-02-23T01:00:00Z
End: 2024-02-29T09:45:00Z
Business Hours: M-F 07:30:00 - 17:30:00 Eastern Standard Time (so either UTC−05:00 or UTC−04:00 depending on time of year)

Answer should be 2835 minutes I believe, thank you

0

There are 0 best solutions below