# Date function adding 1600000 days

**URL:** <https://forum.kirupa.com/t/date-function-adding-1600000-days/34629>\
**Category:** flash\
**Created:** [November 4, 2003, 6:53pm UTC](https://forum.kirupa.com/t/date-function-adding-1600000-days/34629 "2003-11-04T18:53:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![oracleocp](https://avatars.discourse-cdn.com/v4/letter/o/c68b51/32.png) [@oracleocp](https://forum.kirupa.com/u/oracleocp)\
**Post date:** [November 4, 2003, 6:53pm UTC](https://forum.kirupa.com/t/date-function-adding-1600000-days/34629/1 "2003-11-04T18:53:28Z")

</div>

Hi all,

I’m trying to add 1,600,000 days to the date function. The only thing I get is “NaNa” when I test it. Can someone please tell me why this occur.

d=new Date();  
d.setDate(d.getDate()+1600000);  
month = d.getMonth()+1;  
monthsname = months[month-1];  
todaysdate = timedate.getDate();  
//day = timedate.getDay();  
dayy = d.getDate();  
daysname = daysdays[dayy];  
yearr = d.getFullYear();  
test1 = monthsname+" " +dayy+", "+yearr;

fulldate = monthname+" “+todaydate+”, "+year;  
delete timedate;  
timedate = new Date();

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 4, 2003, 7:43pm UTC](https://forum.kirupa.com/t/date-function-adding-1600000-days/34629/2 "2003-11-04T19:43:11Z")

</div>

isnt it rather NaN (not a number???)

maybe since you can’t have more than 31 days in a month it has trouble computing it but I don’t know; does it work for a smaller number (ie 100 instead of 1600000)?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 4, 2003, 7:47pm UTC](https://forum.kirupa.com/t/date-function-adding-1600000-days/34629/3 "2003-11-04T19:47:11Z")

</div>

Yes it is "NaN " and not a number.

It works for smaller value but, I want it to find out the year by adding the 1600000 days to it. Like a future day. I’m doing a trip planner where if you travel by car to outerspace like pluto, it will take at least 1600000 day from today.

thanks.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 4, 2003, 8:03pm UTC](https://forum.kirupa.com/t/date-function-adding-1600000-days/34629/4 "2003-11-04T20:03:05Z")

</div>

\*\*\*\* sorry, i never looked much at the date functions, but there are waaaaaay more experienced flashers out here, and if you dont find your answer try looking on flashkit sometimes =)
