Keep date time related texts relevant. "I have worked for x years." becomes outdated within a year. Years since keeps "x" current …
Keep date time related texts relevant. “I have worked for x years.” becomes outdated within a year. Years since keeps “x” current in your posts and allow your content to age well.
A year must be provided in your text by the attribute “y” such as [years-since y=2012].
As an option, Months by referencing “m” and day by using “d”. Months and day default to “1” if not added in the shortcode.
For example, on an “About” page text, you might have something like:
We’ve worked remotely for [years-since y=2012], which has allowed the team to spend more time traveling and spending time with family.
Or, if you wanted to update a time span on a particular anniversary, you could do something like:
I’m [years-since y=1990 m=5 d=16] old.
html
Add specific HTML tag to the calculation with the html attrribute e.g.
[years-since y=1990 html=span] will wrap the output in a span tag.
text
Add a text attribute with value false i.e.
[years-since y=1990 text=false] will remove the text years from the calculation.
It will output 23 instead of 23 years.
html
attribute as “p” for the shortcode output.html
attribute as “p” for the shortcode output.or
to ||
Yes.
Yes. This will still work even if you revert to the Classic Editor seamlessly.
You can raise lots of issues here and also make some Pull Requests through github