function returns date
Description
Returns the corresponding date for the new period.
Parameters
itDate | input | date | The old date |
iiOldYear | input | integer | The old year |
iiNewYear | input | integer | The new year |
Internal usage
QadFinancials
program code (program1/bperiod.p)
if day (itDate) = 29 and
month (itDate) = 2
then assign viYear = year (itDate) + iiNewYear - iiOldYear
viDay = if viYear modulo 4 = 0 and
viYear modulo 100 <> 0 or
viYear modulo 400 = 0
then 29
else 28
vtDate = date (month (itDate),
viDay,
viYear).
else assign vtDate = date (month (itDate),
day (itDate),
year (itDate) + iiNewYear - iiOldYear).
return vtDate.