FindNearestPrecedingRecurrence — Find the nearest recurrence that comes before target.
FindNearestPrecedingRecurrence TargetDatetime RecurrenceStartDatetime RecurrenceIntervalLength
Return Value
The datetime of the nearest recurrence that comes before the target.
TargetDatetimeDatetime to go off of.
RecurrenceStartDatetimeA datetime that all other recurrences go from.
RecurrenceIntervalLengthHow long between recurrences. See More Info for format.
More Info
Say we have something that happens every so often, perhaps once a week. We call that a recurrence. There is a first recurrence datetime and then there is the amount of time between recurrences. We want to find from some given point (perhaps right now), when was the last recurrence. This command will return that datetime. (See examples for better understanding.)

Currently, the RecurrenceIntervalLength quantity must be of the form ddddThh:mm:ss, where dddd is four digits for the number of days to add or subtract, hh is two digits for the number of hours, and mm and ss are for minutes and seconds.

The recurrence interval must be positive. If you want to go in a forwards direction, then use FindNearestSucceedingRecurrence.

For information regarding exceptions / errors, see here.
% FindNearestPrecedingRecurrence {2000-01-02 03:04:05} {2000-01-01 00:00:00} {0001T00:00:00}
2000-01-02 00:00:00
FindNearestSucceedingRecurrence, IsDatetimeQuantity