Overview
This is the scenario: I'm given a value which represents a portion of the total number of minutes that exist in a standard week (assuming 10,080 minutes a week and 1,440 minutes a day) starting midnight Saturday (so 0 minutes Sunday @ 12am).
I need to convert this minute value into an actual time value (like 8:35am) and I want to use Java's Date and/or Calendar classes rather than calculate this by hand.
Example
Below are some example input values:
- 720 (720 minutes into the week) so 12pm on Sunday
- 3840 (3840 minutes into the week) so 4pm on Tuesday
Using Java's Date and Calendar classes how do I retrieve time component for that relative day?