Open ashrafxcoder opened 8 years ago
Please, provide a JSFiddle for proper feedback
This is the snapshot that i wrote in c#.
What's the expected output? By analyzing you code the output will be 24:00:00
?
Take a time to notice that the event.offset.hours
should return the hours left to the next day.
Fortunately the version 2.2.0 we introduced the totalHours
- %I
directive, that I believe is just the case you are searching:
$(this).text(event.strftime("%I:%M:%S"));
If you just want to fix your code, just correct the math of the var totalHours = ...
Final Time: 2016/08/08 11:21:05 Current TIme: 2016/08/08 08:21:05 See the difference is only in the hours. This shows 00:00:00 in the countdown div
But when I add a day to the final date then the countdown starts
I was pulling my hair with similar problem you have. My advice MAKE SURE that month is correct. I was using Moment.js to calculate dates and it's getMonth() method was zero based thus when I concatenated the strings together to a date it was for previous month so I had to add 1 to (a zero based) month returned from current date.
Yeah I had the same issue and i solved it by then.... Anyway thanks for posting as i it might help someone...
Ashraf Ali
On Oct 14, 2016, at 2:54 AM, Sašo Miocinovic notifications@github.com wrote:
I was pulling my hair with similar problem you have. My advice MAKE SURE that month is correct. I was using Moment.js to calculate dates and it's getMonth() method was zero based thus when I concatenated the strings together to a date it was for previous month so I had to add 1 to (a zero based) month returned from current date.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
It doesn't work for me when the date is the same but just hours are different