Jump to content
UBot Underground

Calculating Month And Day From Daynumber.


Recommended Posts

Not sure if this is what you want or not.

set(#DayNumber,$eval("var now = new Date();
var start = new Date(now.getFullYear(), 0, 0);
var diff = now - start;
var oneDay = 1000 * 60 * 60 * 24;
var day = Math.floor(diff / oneDay);
day;"),"Global")
alert(#DayNumber)

more info

http://stackoverflow.com/questions/8619879/javascript-calculate-the-day-of-the-year-1-366

Link to post
Share on other sites

We are close :)

 

set(#month,$eval("new Date().getMonth()+1"),"Global")
set(#day,$eval("new Date().getDate()"),"Global")

 

The above lets me calculate the day and month of the current day.

 

I need to be able to do this with the daynumber.

 

I need to be able to input the daynumber 231 and get the Month and Day of that daynumber.

Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...