Hi All, How can I add a counter for the date in a publication ? Is there a way to do so ? Or do I need to accept the risk of having a February 35th with a regular counter ?
You must log in or register to comment.
As others have said, it’s
#
, where the arguments are from the PHP’s ()DateTime::format() method.For a string like
February 28th
you can use:'F jS')#
(You simply write it as part of the title, like this:
Hello, today is 'F jS')#
which right now would say (Hello, today is May 7th
.Note that it only woks in the title, not the post body.
You will see the preview of the title if it was posted right now under the title box so you can be sure it’s correct.
#[InjectDate(‘d.m.Y’)]#
This is built in, but I can’t find the documentation.
Try something like
'F jS, Y')#
in the title. (