The reason for using the String functions is to ensure that the values returned are concatenated together and not added together as would be the case if they were considered to be numbers. If we wanted to make sure that juldate was assigned a number rather than a string we could enclose everything after the = inside Number().
So that allows us to retrieve a Julian Date in just a few lines of code. How about if we want to take a julian date and create a date object from it?
As it turns out this is even easier to do as we don't need to add any extra methods to do it. To take a juldate and create a date object from it all we need is:
var day = Math.floor(julday/10000);
var mydate = new Date(year, 0, day);
The first two statements simply extract the day and year from the julian date while the third line creates a date object that is set to that date.