For running J!5.1 you must https://fabrikar.com/forums/index.php?wiki/update-from-github/ or include the new file manually https://fabrikar.com/forums/index.php?threads/joomla-5-1-and-fabrik-cannot-find-files-error.54473/post-285151 See also Announcements
Please see our announcement here.
Maybe the following post will u an idea:
https://fabrikar.com/forums/index.php?threads/solved-conditional-formatting.49361/#post-257790
I would compare the date based on current and return the color accordingly.
BTW..You post on a forum refering to old version of Joomla (2.5).
The calc element should return a string based on the date comparison.
Based on that string value you prepare the custom_css.php
Have you followed this procedure?