"MSGreg" wrote:
Then perhaps you can also include GetWeekDayInteger() to return a numeric indication of the week day?
Until then, this function will calculate it as an integer:
' 0=Sunday
Function GetDayOfWeek(date As Object) As Integer
daysFromEpoch = Int(date.AsSeconds() / 86400) + 1
day = (daysFromEpoch Mod 7) - 4 'epoch is a Thursday (4)
If day < 0 Then
day = day + 7
End If
Return day
End Function
It'd also be really nice to have a way to determine the current timezone offset for a given timezone, adjusting for DST. I have a need at the moment to convert all times to a specific timezone, but adjusting for DST has proven to be horribly complicated, particularly on the days that DST starts and ends.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)