Matrix Version: 5.5.7.1
I am implementing an asset review system where editors will set a date that an asset has been reviewed, and a review period (3, 6, 12 months).
Using these fields I would like to identify if an asset is due for review. I am looking at a third field, identifying if a review is upcoming or overdue.
I am looking at the conditions to trigger it and am just wondering if there is an easier way to do ‘date maths’?
Currently I modify the date to a unix time stamp (^date_format:U), multiplying the period by the number of seconds for a month (date.period x 2629743) and then seeing if this number is less than the Global date (in unix time stamp) (globals_date^date_format:U).
%asset_metadata_review.date^date_format:U^add:{asset_metadata_review.period^multiply:2629743}^lte:{globals_date^date_format:U}%
Is there a better way to handle ‘date maths’?
Is there a better way of doing the review dates?