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.
client server public static date dateEndWk(date transDate)
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.