parm _month=!HPMONTH,_year=!HPYYYY comment comment Calculates the number of days in the specified month comment month and year default to current if not specified comment comment Sets a CIVar _daysof which can be used in other calculations comment comment Chris Bartram comment if !_month=4 or !_month=6 or !_month=9 or !_month=11 then setvar _daysof 30 else if !_month=2 then if ((!_year mod 4=0) and (!_year mod 100<>0)) or (!_year mod 400=0) then setvar _daysof 29 else setvar _daysof 28 endif else setvar _daysof 31 endif endif