###

» Mon Nov 24, 2014 10:44 am

If you have only weekdays (aka. Nothing like "Monday, the 31st of september"), with the clock being precise at the minute, you could start at monday, 00:00 for the minute 0, one minute later, monday 00:01, the minute 1, one hour later, monday 01:01, the minute 61, etc...so you count the number of minutes between monday 00:00 and sunday 23:59.

Number_of_minutes% 60= digits of the minutes

(Int(Number_of_minutes/60))% 24= digit of the hours

(Int(Number_of_minutes/1440))% 7= digit of the day (0 for monday, 1 for tuesday, ..., 6 for sunday)

So you just add up the number of minutes and use those three calculs to retrieve each info, the formulas may be wrong (also 1440 is 24*60 if you wondered).

Edit: ninja'd, both solutions should work so take the one you prefer

Game design is all about decomposing the core of your game so it becomes simple instructions.