Relative time in the backend

Okay, I believe this should be good to go for calculating the start date of the last quarter:

Similar logic would be required for the end date.