473,395 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Firefox Problem with getYear

Hi,

I have the following code:

[HTML]date = new Date();
update = date.getYear();
document.write('<p class="copyright" align="center">© ' + update +' <a href="javascript:validate(\'' + link + '\')">'+ compname + '<\/a>. All Rights Reserved.');[/HTML]

It works ok in IE however in Firefox it keeps displaying 108 instead of 2008, how would I get it to work in Firefox?

I expect this is a simple problem, if it is just let me know ok

thnks in advance

DO NOT ANSWER THREAD AS I HAVE FOUND A SOLUTION AND I CANNOT DELETE IT SO JUST IGNORE IT OK
Feb 22 '08 #1
1 1627
acoder
16,027 Expert Mod 8TB
DO NOT ANSWER THREAD AS I HAVE FOUND A SOLUTION AND I CANNOT DELETE IT SO JUST IGNORE IT OK
I'll answer it anyway, just in case someone has a similar problem. getYear() is deprecated and not year 2000 compliant. Everyone should use getFullYear() instead.
Feb 22 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: NewmanBT | last post by:
As you can see from the code below, several textboxes will be dynamically created and each will be tied to an org. The ChangeComment function should allow for an update to the database whenever...
4
by: Schraalhans Keukenmeester | last post by:
I have no clue why below code (found it somewhere and altered it a wee bit to my needs) will run without problem in both IE and Mozilla FireFox 1.0 but in the latter it takes up close to 100% cpu....
34
by: kroger | last post by:
Hi. I am at a loss to decipher why the javascript on my web page: http://www.psych.nmsu.edu/~jkroger/lab/index.html does not display the date correctly in Firefox. Instead of "2005" for the...
6
by: Franz | last post by:
Hy all, I have a problem with a date in javascript on firefox Browser. I use this javascript method: var dataNow=new Date(); var dd=dataNow.getDate(); var mm=dataNow.getMonth()+1; var...
3
by: Joel Byrd | last post by:
Using javascript to set cookies is apparently not working in Firefox. Here's a simple test page that works in IE, Opera, Netscape, but not Firefox (The javascript is right on the page): ...
2
by: fedorpawel | last post by:
I want to redirect the user to the current month such as November2006.html, but only if the month exists in pubMon array. This code works correctely in IE but stopped working in the new Firefox. In...
7
by: erekose666 | last post by:
I need a java prog to do the following: Create class Date with the following capabilities: a) Output the date in multiple formats, such as: MM/DD/YYYY June 14, 2005 DDD YYYY b) Use...
8
by: Paul E. Schoen | last post by:
I just noticed that my javascript app gives the wrong year in IE, but correct in Firefox, when I use: Form1.ApplicationDate.value = (now.getMonth()+1) + "/" + now.getDate() + "/" +...
2
by: xmanin | last post by:
i have developed some functions in module using which i want to download CSV files from a Stock exchange server. everything is fine but i am unable to download CSV file, i get following msg "3011 The...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.