How to Subtract two dates in salary Component Formula Column

Hi,
I am trying to subtract the two dates: End Date and Start date on the salary slip to get the number of days in the month (not working days) in a salary component formula.

But I can’t seem to be able to subtract the two dates here.
The following don’t work:

  1. end_date - start_date - Error: Expected int got str
  2. getDate(end_date) - getDate(start_date) - Error: getDate is not defined.
  3. frappe.datetime.get_day_diff(begin, end) - this works in other places but not on the salary component formula space. Error: frappe is not defined.

Can’t seem to be able to use generic JS or Python functions.

Any help is welcome!

Thanks!

I managed to achieve a very situational workaround using the string function in python.
int(end_date[8:10]) - int(start_date[8:10]) + 1

But any help on the original is very welcome.