Shady74
01-29-2009, 12:53 AM
Hi,
I'm pretty much a newbie when it comes to javascript and I have a small request for anyone who is willing to help me on this.
All I need is a simply date script, but a bit customized.
Basicly the script should show date as "January 1, 2009" in a website, but it wouldn't show the actual date. It would show a custom date.
To calculate the date shown, three dates are used:
D1 (date 1) is the current date
D2 is a pre-set date (for example 1.1.1990)
D3 is also a pre-set date (eg 1.1.2000)
The final date is D1-D2 (difference between the two dates...in days), multiplied by X (a positive whole number) and added to D3 (date 3).
For the sake of example, if:
D1 is today (29. January 2009)
D2 is 28. January 2009
D3 is 1. January 2000
and the number X has a value of 2
the final date would be 3. January 2000. The difference between D1 and D2 is 1 day, multiplied by 2...equals two days. Added to the D3 makes it January 3rd.
Thanks anyways
I'm pretty much a newbie when it comes to javascript and I have a small request for anyone who is willing to help me on this.
All I need is a simply date script, but a bit customized.
Basicly the script should show date as "January 1, 2009" in a website, but it wouldn't show the actual date. It would show a custom date.
To calculate the date shown, three dates are used:
D1 (date 1) is the current date
D2 is a pre-set date (for example 1.1.1990)
D3 is also a pre-set date (eg 1.1.2000)
The final date is D1-D2 (difference between the two dates...in days), multiplied by X (a positive whole number) and added to D3 (date 3).
For the sake of example, if:
D1 is today (29. January 2009)
D2 is 28. January 2009
D3 is 1. January 2000
and the number X has a value of 2
the final date would be 3. January 2000. The difference between D1 and D2 is 1 day, multiplied by 2...equals two days. Added to the D3 makes it January 3rd.
Thanks anyways