Jump to content

2010 date issue


AndrewJ1313

Recommended Posts

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.

 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.