Salary Calculation for Resignee

What is the formula to use to calculate the salary of the resignee who does not complete one full calendar month?

When the employee did not complete one full month of the service, the salary shall be prorate based on total number actual working days divided by total number of working days of the month.

For example,
The employee last day of service is on 15 December.
Employee salary = S$2000

From 1 December to 15 December = 11 working days
From 1 December to 31 December = 23 working days (inclusive of public holiday)

Salary for December is 11/23 x S$2000 = S$956.52