Convert a calander date to a julian date
Convert a calander date to a julian date. An input date is converted to either a JJJ or a YYYYJJJ date where YYYY is the year and JJJ is the julian day.
- MONTH
- Value of the input month
- DAY
- Value of the input day
- YEAR
- Value of the input year. This may be a 2- or 4-digit year.
- JDATE
- Returned Julian date. Declare as an integer.
- YRDAYFLG("NO")
- Flag: include year in JDATE. If flag is NO the julian date is returned as JJJ, the 3-digit julian day. If flag is YES the julian date is returned as YYYYJJJ, a 7-digit year and julian day combination.
The calander date 10/04/2000 is converted to a julian date of 278 which is the default return type.
The calendar date 03/20/2001 is converted to a julian date of 2001079 since the YRDAYFLG was specified as YES.
The input year is first converted to a 4-digit year and checked to see if it's a leap year. The number of days in February is adjusted if the year is a leap year. The month and day values are checked for correctness. The julian day is calculated and if YRDAYFLG=YES the year is added to the return value.
None.
The input date specification was invalid. The day was out of range for the month specified.
None.