mozilla-b2g/gaia — pull request #1902 by lightsofapollo (2012-06-24 03:08:01+00:00)
Title: fix first day of the week

This fixes a test failure I found while testing out a calendar feature... (by running all the tests)

I think whats going on here ( I have not slept much or maybe I am misunderstanding the intent of this function ) but it seems like there is an assumption that Date#getDay starts at 1 instead of zero so its failing because its Sunday. Ben take a look and let me know what you think.

Also- I should have mentioned this before but date takes negative numbers so it may feel cleaner to use them for your calculations if that makes sense to you. I found it was easier then going from Date -> Numeric -> Date.