timrwood/moment — pull request #278 by egguy (2012-04-16 17:11:51+00:00)
Title: problem with eod() and UTC date

Hi,

I think there is a problem with how eod() handle UTC formatted date. I use the version bundled with Kalendae a JS calendar widget.

In the documentation it's written:

> Set the time to the end of the day.
>
> moment().eod(); // set the time to 11:59:59.999 pm tonight
> This is essentially the same as the following.
>
> moment().hours(23).minutes(59).seconds(59).milliseconds(999);

But when you use eod(), the date is converted to localtime.
ex:

> moment.utc("03-07-2012","MM-DD-YYYY").eod().toString()
> "Wed Mar 07 2012 23:59:59 GMT+0100 (CET)"
> Kalendae.moment.utc("03-07-2012","MM-DD-YYYY").hours(23).minutes(59).seconds(59).milliseconds(999).toString()
> "Thu Mar 08 2012 00:59:59 GMT+0100 (CET)"

I've created a unit test to verify the behavior.

regards