Beginning of the current plan year
This is the recommended expression for rounding dates to the beginning of the current plan year:
BOY1_DT:= #BEGMTH (2 #FSTBUSDAY A_DT) &
; find the first business day of the current plan year, then round the first business day
; to the beginning of month (i.e., the beginning of the current plan year)
A_DT may be either a single date (e.g., 7/16/2015, DOH, #DODEC) or an array of dates (e.g., #DATE).
We start with #FSTBUSDAY because it's the easiest way to work with plan years, but then we need to use #BEGMTH to guarantee that we are at the beginning of the month. 2 #FSTBUSDAY A_DT finds the first business day of the plan year, which is either the first, second, or third day of the current plan year, depending on whether the first day of the current plan year is a weekday, Sunday or Saturday. If #FSTBUSDAY returns the second or third day of the plan year, #BEGMTH converts it to the first day.