calendar.parse() cannot parse numbers properly
Reported by Sergey Avseyev | September 18th, 2010 @ 11:11 AM | in 2.0.0 Release
Calendar parse method works incorrectly
new Calendar().parse('2010-07-01')
=> Thu Jul 01 2010 00:00:00 GMT+0300 (EEST)
new Calendar().parse('2010-08-01')
=> Tue Dec 01 2009 00:00:00 GMT+0200 (EET)
I think it because of using parseInt() method here
http://github.com/rightjs/rightjs-ui/blob/4526edad43bc7b668b61/src/...
which treats '08' as octal number. I think it should be
toInt(value)
or parseInt(num, 10)
Comments and changes to this ticket
-
Sergey Avseyev September 18th, 2010 @ 11:12 AM
- Assigned user set to MadRabbit
-
MadRabbit September 18th, 2010 @ 11:17 AM
- Milestone set to 2.0.0 Release
- Tag changed from calendar to bug, calendar, ui
- Milestone order changed from 196625 to 0
a good point. will you patch it and push on github or you'll wait for me?
-
MadRabbit September 18th, 2010 @ 12:35 PM
- State changed from new to resolved
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
RightJS Core Tickets