c$Header: /weru/cvs/climate/wind_gen/src/libf/lstday.for,v 1.1 1999-04-12 19:49:48 ffa Exp $ c integer function lstday i (mm, yyyy) c + + + PURPOSE + + + c Given a date in mm/yyyy format, lstday will return the last day c of that month. c c + + + KEYWORDS + + + c date, utility c c + + + ARGUMENT DECLARATIONS + + + integer mm, yyyy c c + + + ARGUMENT DEFINITIONS + + + c mm - month c yyyy - year c c + + + LOCAL VARIABLES + + + integer lm, ld, ly integer julian c c + + + LOCAL DEFINITIONS + + + c julian - julian day value c c + + + SUBROUTINES CALLED + + + c caldat c c + + + FUNCTION DECLARATIONS + + + integer julday c c + + + END SPECIFICATIONS + + + c c Go to the first day of the next month c (This is exactly one day after the day we want to find) lm=mm+1 ld=1 ly=yyyy if (lm.eq.13) then lm=1 ly=yyyy+1 end if c We simply find the Julian Day and subtract 1 day to get the last c day of the previous month julian=julday (ld, lm, ly)-1 c Now convert back to gregorian calendar to get the actual day call caldat (julian, ld, lm, ly) lstday=ld c return end c c$Log: not supported by cvs2svn $ cRevision 1.1.1.1 1999/03/12 17:05:31 wagner cBaseline version of WEPS with Bill Rust's modifications c c Revision 1.2 1998/09/03 18:35:39 jt c check in a full copy of WEPS - I hope ??? c c Revision 1.1.1.1 1995/01/18 04:20:07 wagner c Initial checkin c c Revision 2.1 1992/03/27 17:22:53 wagner c Version 2 code. c