AndrewJ1313 Posted January 1, 2010 Share Posted January 1, 2010 I have a count down script I use for (drum roll please) counting down to certain events. I have been using the script since August for weekly events and it has worked fine. There is an event for this afternoon and for some reason, the script has worked all week until today. It is now reading that the event date and time have been reached and is displaying the event now text. My question is: is there an issue with Javascript and the year 2010? I have had some similar issues with PHP as well concerning the date. Quote Link to comment Share on other sites More sharing options...
Mchl Posted January 1, 2010 Share Posted January 1, 2010 There's nothing special about 2010. What's more probable is that the script is buggy when it comes dealing with year's end/beginning. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted January 1, 2010 Share Posted January 1, 2010 I'm going to guess that the format you are using for the date is one where the order of the fields making up the date are not, left-right: year, month, day, such as yyyy-mm-dd. You are probably using a format where comparisons work when the dates all have the same year, such as mm/dd/yyyy, but does not work when there is more than one value for year involved. What do your dates look like? Quote Link to comment Share on other sites More sharing options...
AndrewJ1313 Posted January 8, 2010 Author Share Posted January 8, 2010 I'm going to guess that the format you are using for the date is one where the order of the fields making up the date are not, left-right: year, month, day, such as yyyy-mm-dd. You are probably using a format where comparisons work when the dates all have the same year, such as mm/dd/yyyy, but does not work when there is more than one value for year involved. What do your dates look like? Sorry, it has taken me so long to reply. I have been on vacation since the 1st. You are correct about the date format. I adjusted the script and it is working fine now. Thanks, Andrew Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.