Re:iOS 6: Do Not Disturb mode stays on after scheduled time
by osiemens on Wednesday January 02, 2013 @03:42PM
(#4999144)
It's a not entirely uncommon bug having to do with the naming of the first week of the year. Perhaps it's even as deep as NSCalendar, but I can't check that right now. ref: http://stackoverflow.com/questions/1106943/nscalendar-first-...
[ Parent
| on HN ]
Re:iOS 6: Do Not Disturb mode stays on after scheduled time
by VMG on Wednesday January 02, 2013 @04:04PM
(#4999284)
Oh yes. The ISO definition is pretty straightforward: «The first week of a year is the week that contains the first Thursday of the year.» (http://en.wikipedia.org/wiki/ISO_week_date)
Actual implementations often look more like this: http://www.epoch-calendar.com/support/getting_iso_week.html
Implementing it as a one-liner would be an interesting code golf exercise.