|
Cookbook /
EZDateSummary: make displaying the date, time, and PHP timestamp inside the wiki easy
Version: 1.3
Prerequisites: none
Status: Working
Maintainer: GNUZoo
Categories: Markup
Downloads: EZDate.phpΔ
Questions answered by this recipe
DescriptionDisplay date, time, or use a PHP timestamp in a wiki page. This is easier than using MoreCustomPageVariables. Syntax is easy. Use the form of page code like this: (:ezdate:)
(:eztime:)
(:ezdate formattingstring:)
(:eztime formattingstring:)
(:ezdate formattingstring timestamp:)
(:eztime formattingstring timestamp:)
Default formatting code:Todays date is (:ezdate:). The current time is (:eztime:).
will display like this: Todays date is April 2, 2007. The current time is 5:04:56.
Formatted code:(:ezdate M j, Y h:i:s a:)
will display like this: Mar 30, 2007 11:55:01 pm
TimeStamp code:(:ezdate "M j, Y h:i:s a" 1175680596:)
will always display this: Apr 4, 2007 04:56:36 am
Getting the current PHP timestampThis recipe defines a custom pagevariable $EZTimeStamp. It can be used anywhere by putting it in braces. The current PHP timestamp is {$EZTimeStamp}
The PHP timestamp is a great way to store a date because it
can easily be displayed in any form using the EZDate recipe.
This can be obtained in PHP by using the Note:Depending on the formatting Date Formatting InformationDate formatting information is available at url InstallingCopy EZDate.phpΔ to your cookbook directory In your config.php enter: include_once("cookbook/EZDate.php");
or in your farmconfig.php enter: include_once(" $FarmD/cookbook/EZDate.php");
NotesRelease NotesThis program is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation http://www.fsf.org either version 2 of the License, or (at your option) any later version. Copyright 2007 by GNUZoo (guru@gnuzoo.org) Please donate to the author at url: http://gnuzoo.org/GNUZooPayPal
CommentsSee AlsoContributors |