Global::dateEndWk Method [AX 2012]
Returns the date of the end of the week. The first day of the week is determined by the firstDayOfWeek function, which is locale-aware.
Syntax
client server public static date dateEndWk(date transDate)
Run On
Called
Parameters
- transDate
Type: date
The date for which the end of the week date information is desired.
Return Value
Type: date
Date of the end of the week.
Remarks
If the week starts on Sunday, the end of the week will be next Saturday. Similarly, if the week starts on Monday the end of the week will be next Sunday The logic below can be implied into a single if else block, but might be difficult to follow.