function returns date
Description
This method is used to return 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/bglcalendar.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.