Home > FAQ > Service Definitions > How to count service based on user-defined half months

How to count service based on user-defined half months

Question: My client credits salary based on how many days in the month the participant worked.  The reported salary is in a start & stop array called "Salary."  Working between 1 and 10 days in a calendar month yields no salary, between 11 and 20 days yields one half month of salary, and more than 20 days yields 1 month of salary. How can this be accomplished?

Answer:  Set up a Service Definition (and Service Definition Set to reference it) that credits service as defined by the client (and summarized above) using the parameterization outlined below. Use this Service Definition Set for allocating the salary in the Salary Definition.  

A. Service Definition:

  1. Name: Service for salary allocation
  2. Service based on Elapsed Time
  3. Service rounding rule:  <none>
  4. Measurement period: month
  5. Elapsed time parameters: date subtraction, 365.25; Start date field: Date_Of_Hire
  6. Service Start Adjustment: Date adjustment to service start date: Name: Beginning of Plan Year (earlier of DOH and first reported salary) (see below for definition)
  7. Service Stop Adjustment: Date adjustment to service stop date: Name: 1st of month, middle of month, first of next month based on day of month (see below for definition)
    Allow service to accrue beyond decrement.
    Stop post-decrement accruals at this date adjustment: Name: End of plan year containing the later of decrement and the last reported salary (see below for definition)

B. Service Definition Set:

  1. Name: Service for salary allocation
  2. Service Definition: Service for salary allocation
  3. Service Definition Set rounding rule: Name: Nearest half month (see below for definition)

C. Date Adjustments:

    - Adjust date: 
      #THIS #MIN Date_of_Hire #MIN (1 #EFFDATE Salary) 
    - Round to Beginning of Plan Year Started
    - Adjust date: 
   D:= #DAY #DATE & 
 

#IF D <= 10

#THEN 1+#THIS-D

#ELSEIF D<= 20

#THEN 16+#THIS - D

#ELSE 1 + #ENDMTH #THIS

#ENDIF

    - Adjust Date:
      #THIS #MAX #DODEC #MAX (2 #EFFDATE SALARY) 
    - Round to end of Plan year Started.

D. Service rounding:

  1. Name: Nearest half month
  2. Round amount to Semi-month (1/24),
  3. Direction: Nearest.

Once the Service Definition Set is defined, reference it in the Salary Definition that is allocating salary based on the user-defined half months outlined above.  See Allocate annual salary amounts into user-defined half months for monthly salary for more details on this step.