Hector Landete Hector Landete - 1 year ago 89
jQuery Question

Get full date from day of the year

I'm using js and jquery.

I've been looking on the page and I found this:
Javascript calculate the day of the year (1 - 366)

I'm trying to do the oposite. For example:

208 would be today (2016/07/26)

Any idea how could I do this?

Thank you very much in advance.

Answer Source

The shortest way:

new Date(2016, 0, 208)

will return Date 2016-07-26

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download