Features / Usability

Features / Usability

Long Date Format in Trackers

posts: 681

Using drop down select date or date picker, is it possible to have the long date format display in a pretty tracker?
Thank you folks for any help.

posts: 681

Boy thanks Bernard that may have answered my question, so per that link you shot me too, if I use this in my pretty tracker template:

{$f_lastmodif|tiki_short_date} will display human readable date only.
{$f_lastmodif|tiki_short_datetime} will display human readable date and time.

Then I would just need to replace short with long correct?

posts: 7984 Israel
will display human readable date only

Not exactly...
It will display using parameters from tiki-admin.php?page=general => Date and Time tab.
There you can set a short format and a long format as well as time.

date = date only
date = datetime = date and time
You are correct on this yes.

posts: 681

Thanks Bernard, I understand the General Settings date formats, the problem is getting a long date such as May 22, 2018 to show up in a pretty template, I am having a hard time to get that to show, if you see this link https://thepatriotwoodwiki.org/College-of-the-Redwoods you'll see in the infobox "Established" will only show "short date", getting the long date to display is complicated.
Would you know the code or string I need to have for the long date to display?

posts: 681
So far I have been unable to get this to work, it seems a long date format should be able to display in tracker view and pretty tracker template. Can anyone point me to some documentation with an example of long date display for tracker? It may not exist, but if anyone has a working sample that would be nice too, thanks!
posts: 681
Well thank you Bernard, that is very nice of you!

posts: 7984 Israel

Hi John,

I tested a bit.
As the doc says (and I ;) ) {$f_lastmodif|tiki_short_date} will display Tiki date based on your setting at tiki-admin.php?page=general: "tiki-admin.php?page=general".

You can then customise this how you want based on:

I was a bit disappointed at my first try because of the Tiki cache but I confirm you it is working fine and like the doc say on Tiki 18.x.

Just don;t forget to refresh Tiki caches after saving your template.

Hope this help

posts: 681
Thank you Bernard, so with this {$f_lastmodif|tiki_short_date} does it understand which tracker field id to grab onto?
posts: 7984 Israel

{$f_lastmodif} is the tracker item last modification date and {$f_created} is for the item creation (again check the doc because it is there and may have a typo error here).

If you want to display a date from a field I would try the same modifier in the tag.
IE: {$f_1|tiki_short_date}

I guess it should be a date type field.
Never used it that way so I can’t confirm, but try your luck. :-)

Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.