Detecting language please wait for.......
Another December, another change of copyright years. I had it set up as <ri;%upyear>, but the editors wanted it changed already in late December. So we replaced that tag with 2020, and will have to do it again in a year.
We're wondering, for next year, is there a better way? The editors are not allowed to touch the formats. Is there a way to set the year change to happen, say, December 20th, rather than on January 1st?
Logically, you can write a macro that tests if the "%upmonth" is greater than 11 and if "%upday" is greater than 19. If this is true, you can output "%upyear + 1".
So that would be something like this (if I have my macro syntax correct):
If there's any chance that this <mc> macro can occur where…
I just revised the syntax in my post (from yesterday).
Something was nagging me when I posted, about my syntax not being completely correct, but I couldn't think of what I had that might be wrong.
If there's any chance that this <mc> macro can occur where text might wrap to a new line, then because the <ri> macro generates text and because there's some "quirks" with the <mc> macro (in this situation), it would be best in that situation to write this as follows:
Jonathan DagrestaSDL XPP Engineering
I edited my post to change the '&' to a '*'. The '*' (multiply) character is what you use for an AND in XPP macro syntax (not an '&').
At least I remembered correctly that '+' (plus) was used for an OR.
Thank you, Steve and Jonathan. I'll try this as soon as the editors tell me how early they need the date to change to 2020.