madumoulin / jquery-countdown

Automatically exported from code.google.com/p/jquery-countdown
0 stars 0 forks source link

By using a three digits in the days the mod sentence doesn´t work as expected #57

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Set the startTime option to something like 364:12:32:55 (using 3 digits for 
the days). Set the format option to ddd:hh:mm:ss

What is the expected output? What do you see instead?
The limit values must be 23 for the hours, 59 for the minutes and 59 for the 
seconds. However the values are wrong showing 95 for the minutes and the 
seconds.

The problem is that the script assume that the number of digits for the day 
value is always 2. The script is programmed by using the mod operator (%) with 
2 to establish the max value of the digits. 

I added three new variables to the script to get the position on each iteration.

I have attached my modified script.

Thanks,
Javier Sanjuan

Original issue reported on code.google.com by jsarteg...@gmail.com on 30 Nov 2012 at 8:50

Attachments: