Leap years can influence the number of days in a year and of course the number of days in February. Date calculations are all covered and working fine, so if you feel like adding 1 to the 28th of february in your Abap coding, the 29th will be returned in a leap year and the 1st of march in regular years.
This is a bit of coding that can be used to check for leap years:
* In leap years this value should be 366, 2004 mod 4 = 0 = leap year.
* However: what year is the selection for ? The report can run from
* november till march.. Answer: use the end date to determine the
* number of days in a year (functional choice)
MOVE pn-endda(4) TO lv_year.
lv_year = lv_year MOD 4.
IF lv_year = 0. "Leap year !
gv_calendar_year_duration = 366.
ELSE.
gv_calendar_year_duration = 365.
ENDIF.
You'll be interested in the calculation logic in module /SAPNEA/JSC_LEAP_YEAR - if the above didn't satisfy you.
