captbaritone / captbaritone/datejs
AddHours stops on Sunday at 00:00
- Dominant language
- JavaScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
```
What steps will reproduce the problem?
1. Create a new date
2. call addHours(1) until you get to next sunday
What is the expected output? What do you see instead?
The date object method addMilliseconds calls getMilliseconds that for some
reason returns 0. So the time does not get increased
What version of the product are you using? On what operating system?
1.0 Alpha-1
Please provide any additional information below.
I've changed the method code from
$P.addHours = function (value) {
return this.addMilliseconds(value * 3600000); /* 60*60*1000 */
};
to
$P.addHours=function(value){
this.setTime(
this.getTime() + (h*60*60*1000)
);
return this;
}
```
Original issue reported on code.google.com by `andrea.s...@gmail.com` on 28 Mar 2011 at 11:04
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.