Re: DAY Number in an Year



ttw@xxxxxxxxxxxxxxx wrote:
In 2003, I suggested:
FUNCTION juldate (year,month,day)
c
c   Converts DAY/MONTH/YEAR to a Julian date transformed to 2000
c
       IMPLICIT NONE
c
      INTEGER juldate, day, month, year
c

juldate=367*year-7*(year+(month+9)/12)/4-3*((year+(month-9)/7)/100


1 +1)/4+275*month/9+day-730516 END


The constant 730516 can be adjusted to match any date desired as the starting point or to change Gregorian dates to Julian.

But the OP uses day-of-year, not Julian date. I thought they were totally different beasties?

cheers,

paulv

--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
.



Relevant Pages

  • Re: DAY Number in an Year
    ... FUNCTION juldate ... IMPLICIT NONE ... INTEGER juldate, day, month, year ... starting point or to change Gregorian dates to Julian. ...
    (comp.lang.fortran)
  • Re: DAY Number in an Year
    ... >> FUNCTION juldate ... >> the starting point or to change Gregorian dates to Julian. ... For a one-to-one correspondence with calendar dates, ... the leap day at the end of Feb. was at the end ...
    (comp.lang.fortran)
  • Re: DAY Number in an Year
    ... ttw@xxxxxxxxxxxxxxx schrieb: ... > FUNCTION juldate ... > starting point or to change Gregorian dates to Julian. ... Prev by Date: ...
    (comp.lang.fortran)
  • Re: DAY Number in an Year
    ... FUNCTION juldate c ... IMPLICIT NONE ... INTEGER juldate, day, month, year c ... starting point or to change Gregorian dates to Julian. ...
    (comp.lang.fortran)
  • Re: C vs Perl
    ... What about Julian Albo's (sorry Julian, don't know how to put the accent on in Moz...)? ... His is three lines shorter: ... uses the implicit return 0 from main ...
    (comp.lang.cpp)