EZLocaleDate
Note, the PmWiki core has an equivalent Markup Expression "ftime" which can be used instead of this recipe like this:
* Time: {(ftime %X)} * Date: {(ftime %x)} * Local: {(ftime %L)} |
|
The core function allows additionally to set a specific time stamp, and to display it in a format %L
adapted for individual international visitors (rather than based on the server locale).
v 1.4 still uses PHP deprecated function strftime --gnuzoo
Questions answered by this recipe
- How do I display the date or time with a non-English language in a wiki page using wiki code?
- How do I display the date or time with a non-English language in a specific format in a wiki page?
Description
Display date or time with a non-English language in a wiki page.
This is easier than using MoreCustomPageVariables.
Syntax is easy. Use the form of page code like this:
Default formatting code:
(:ezlocaledate:)
. The current time is (:ezlocaletime:)
.
will display like this:
Formatted code:
(:ezlocaledate "M j, Y h:i:s a":)
will display like this:
Note: ezlocaledate can display time and ezlocaletime can display the date!
Date formatting information is available at url
Installing
Copy EZLocaleDate.phpΔ to your cookbook directory
In your config.php enter:
or in your farmconfig.php enter:
$FarmD
/cookbook/EZLocaleDate.php");
Notes
Release Notes
- Version: 1.2 - Initial Release
See Also
Contributors
Comments
See discussion at EZLocaleDate-Talk?
User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.