I want to do the following:
If an entry has been modified, and if that modification took place more than ten minutes after the original posting, then show "Last update at $MTEntryModifiedDate$".
Less-Short Version:
I'm currently using the Compare plugin like this:
CODE
<MTIfNotEqual a="[MTEntryDate]" b="[MTEntryModifiedDate]"><span style="font-weight:normal;">→ Last updated <MTEntryModifiedDate format="%A, %B %e at %l:%M %p"></span></MTIfNotEqual>
But because I almost always make small changes in the few minutes after posting, this will almost always result in the "Last Updated" text being displayed, when I really only want it displayed if I've made a real change (i.e., if my modification occurred more than 10 minutes after the original post -- arbitrary time period, but it fits my habits.)I was hoping to do this sans PHP, possibly using some combo of Compare and Arithmetic. (Ideally I'd just do it within Compare, but it doesn't do the math.) I think I could use Arithmetic's MTSetVar2 tag and Compare's MTIfGreaterThan tag to accomplish this. In theory, it should work; in practice, it doesn't.
I think the fundamental problem is that, unformatted, $MTEntryDate$ doesn't return a numerical string (like the PHP date() function would), and so the Arithmetic tags can't work on them. So my question to you is: how would you achieve my goal? Would you force the date tags to return a string by formatting them as such? If so, how would you format them, and when you subtracted one from the other, what value would indicate ten minutes? Is there a better way altogether to go about this?