Program: MKYDOY2YMDHMS

  mkydoy2ymdhms...........compute y m d h m s from year and doy with fraction
 
  call: [ymdhms,y,mn,d,h,mi,s]=mkydoy2ymdhms(year,doy);
 
        year: the year (four ciphers required!)
        doy: the number of the day within YEAR, with decimal fractions
             for the exact time
             has to be positive and not exceed the number of days in
             the given year. 
             otherwise undefined behaviour !!
             (that means: implosion of your cathode ray tube possible then).
 
  result: ymdhms: a string of the form yymmdd_hhmmss, as for EXTR_FILE
                  (do you see the millenium bug? this format isn't my idea!)
               y: the year, again
               mn: the month
               d: th day
               h: hours
               mi: minutes
               s: seconds, with fractions
 
  Martin Knapmeyer, 17.09.1997
 
  BUGS: no plausibility test for DOY
        seconds may be "60" in some cases (example: compare
                  [ymdhms,y,mn,d,h,mi,s]=mkydoy2ymdhms(1999,35.4) and
                  [ymdhms,y,mn,d,h,mi,s]=mkydoy2ymdhms(1999,100.4)
        this problem is because 0.4 is 2/5 and cannot be represented in binary
        digits. No idea how to fix. If problems with times occur, be sure that
        minutes and seconds are not "60" and that the output string sontains
        the correct minutes.

Read M-File Source Code


eof.