Long Date Format in Trackers Posted by John Morris 21 May 2018 00:29 UTC 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.
Posted by Bernard Sfez / Tiki Specialist 21 May 2018 10:15 UTC How you input the date and time and how you display it is independent. Again I don’t use a lot pretty tracker lately but: https://doc.tiki.org/Pretty-Tracker#Date_modifier ;) User Bsfez | Bernard Sfez | me...@bs... | https://www.bsfez.com
Posted by John Morris 21 May 2018 19:33 UTC 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: Copy to clipboard{$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?
Posted by Bernard Sfez / Tiki Specialist 22 May 2018 07:10 UTC 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. User Bsfez | Bernard Sfez | me...@bs... | https://www.bsfez.com
Posted by John Morris 22 May 2018 11:45 UTC 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?
Posted by John Morris 27 May 2018 13:57 UTC 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!
Posted by Bernard Sfez / Tiki Specialist 27 May 2018 18:48 UTC Aoutch... I’ll try to find sometime to create a playground and check. User Bsfez | Bernard Sfez | me...@bs... | https://www.bsfez.com
Posted by Bernard Sfez / Tiki Specialist 30 May 2018 18:10 UTC 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: https://doc.tiki.org/Date-and-Time#Date_and_Time_Formats http://php.net/manual/en/function.strftime.php 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 User Bsfez | Bernard Sfez | me...@bs... | https://www.bsfez.com
Posted by John Morris 30 May 2018 20:09 UTC Thank you Bernard, so with this {$f_lastmodif|tiki_short_date} does it understand which tracker field id to grab onto?
Posted by Bernard Sfez / Tiki Specialist 31 May 2018 07:56 UTC {$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. 😊