I actually just came across some great code that NOAA uses for sunrise/ sunset/other ephemeris calculations here:
http://www.srrb.noaa.gov/highlights/sunrise/calcdetails.html they give their source as "Astronomical Algorithms" by Jean Meeus. They have this js routine: // ***********************************************************************/ //* Name: calcDayOfYear */ //* Type: Function */ //* Purpose: Finds numerical day-of-year from mn, day and lp year info */ //* Arguments: */ //* month: January = 1 */ //* day : 1 - 31 */ //* lpyr : 1 if leap year, 0 if not */ //* Return value: */ //* The numerical day of year */ // ***********************************************************************/ function calcDayOfYear(mn, dy, lpyr) { var k = (lpyr ? 1 : 2); var doy = Math.floor((275 * mn)/9) - k * Math.floor((mn + 9)/12) + dy -30; return doy; } I haven't tested it, but it's what they use for all their online calculators, so take that for what it's worth. On Nov 16, 11:46 am, wytten <[email protected]> wrote: > Using GWT 1.5.3 it is not immediately obvious to how to convert a > java.util.Date into a Julian date (i.e, compute day of year). Is > there some way to do this without rolling your own? Thanks. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=.
