Is a date an end of measurement period date
First calculate the end of the measurement period containing A_DT (e.g., EOMP_DT) using any of the end of period techniques. And then test if A_DT is equal to the end of the measurement period. Here are a few examples, where A_DT could contain a single date or all calculation dates (e.g., #DATE in a transformation expression).
; A_DT is a single date or an array of date(s) that you need to
; adjust (e.g., DOB field or #DATE in a transformation expression)
For the plan year (as specified in the Plan Definitions):
EOY_DT:= #ENDMTH (2 #LSTBUSDAY A_DT) &
IsEndMP:= A_DT = EOY_DT &
For a month:
EOM_DT:= #ENDMTH A_DT &
IsEndMP:= A_DT = EOM_DT &
For a bi-week (where
AnyEOBW_DTis any end of bi-week, e.g.,
AnyEOBW_DT:= 9/5/1992 &):
EOBW_DT:= AnyEOBW_DT + [14 *
#CEILING
{(A_DT- AnyEOBW_DT)/14}] &
IsEndMP:= A_DT = EOBW_DT &
For a week (where
AnyEOW_DTis any end of week, e.g.,
AnyEOW_DT:= 9/5/1992 &):
EOW_DT:= AnyEOW_DT + [7 *
#CEILING
{(A_DT- AnyEOW_DT)/7}] &
IsEndMP:= A_DT = EOW_DT &