Home Tutorials/Guides Guides Simple Date/Time Plugin Installation
Simple Date/Time Plugin Installation
Simple Date/Time Plugin Installation
Documentation
Article Index
Simple Date/Time Plugin Installation
How to Install
Settings
Troubleshooting
Copyright/Credits
All Pages

Simple Date/Time Plugin (plg_aqsg-currentdatetime) is a Joomla 1.5 plugin which enables you to automatically include the current date in your content..

Here are some examples:

  • { currentdatetime }Today is the %dd%%daysuffix% of %MONTH% %yyyy%{ /currentdatetime } - Today is the 7th of January 2009
  • { currentdatetime }%rfc2822%{ /currentdatetime } - Wed, 07 Jan 2009 23:48:05 +1100
  • { currentdatetime }%military%{ /currentdatetime } - 20090107230105EST


HOW TO INSTALL

Step 1
First install the Simple Date/Time Plugin using the Joomla 1.5 installer.

Step 2
Create a new content item (or open an existing one) and simply insert { currentdatetime }%rfc2822%{ /overlib }, where you want your current date/time string to appear inside your text. It doesn't have to be at the end of your article, it can be anywhere within your content item.

Step 3
Open up your site and you should see the current date/time text inside your article. You can add as many date/time replacements as you want in each content item.


SETTINGS

Any of the operators below can be used in a normal content item.

Operator Description Example
%currentday%
Day of the year  - Digit version
(0 - 365)
%yy%
Current Year  - Short version
(85, 99, 01, 08)
%yyyy%
Current Year  - Long version
(1985, 1999, 2001, 2008)
%ly%
Current Year  - Leap Year
(1 = Yes, 0 = No)
%dd%
Day of the month - No Leading Zeros
(1 - 31)
%DD%
Day of the month - Leading Zeros
(01 - 31)
%month%
Month of the year - Short Version
(Jan - Dec)
%MONTH%
Month of the year - Long Version
(January - December)
%mm%
Month of the year - No Leading Zeros
(1 - 12)
%MM%
Month of the year - Leading Zeros
(01 - 12)
%daysinmonth%
Days in current month - Digit Version
(28 - 31)
%week#%
Week of the year - Digit version
(10, 20, 42)
%day%
Day of the week  - Short version
(Mon - Sun)
%DAY%
Day of the week  - Long version
(Sunday - Saturday)
%day#%
Day of the week  - Digit version
(1 - 7)
%daysuffix%
Day of the week  - Suffix
(st, nd, rd, th)
Time Related
%ampm%
Current Time  - Lowercase AM/PM
(am or pm)
%AMPM%
Current Time  - Uppercase AM/PM
(AM or PM)
%swatch%
Current Time  - Swatch Internet Time
(000 - 999)
%12hh%
Current Time  - 12-hour No Zeros
(1 - 12)
%12HH%
Current Time  - 12-hour Leading Zeros
(01 - 12)
%24hh%
Current Time  - 24-hour No Zeros
(0 - 23)
%24HH%
Current Time  - 24-hour Leading Zeros
(01 - 23)
%min%
Current Time  - Minutes With Zeros
(00 - 59)
%sec%
Current Time  - Seconds With Zeros
(00 - 59)
%micro%
Current Time  - Microseconds
(12345)
Timezone Related
%tz%
Current Timezone  - Short Version
(GST, GMT, UTC)
%TZ%
Current Timezone  - Long Version
(Atlantic/Azores)
%daylightsavings%
Current Timezone  - Daylight Savings
(1 = Yes, 0 = No)
%tzoffset%
Current Timezone  - Offset In Seconds
(12345)
%gmt%
Current Timezone  - GMT Offset No ':'
(+1000)
%GMT%
Current Timezone  - GMT Offset With ':'
(+10:00)

Preconstructed Date/Time Strings

There are a couple of builtin date/time strings available for use:

Operator Description Example
%iso8601%
Date/Time Format  - ISO 8601 (2008-08-08T18:18:18+10:00)
%rfc2822%
Date/Time Format  - RFC 2822
(Fri, 08 Aug 2008 18:18:18 +1000)
%military%
Date/Time Format  - Military
(20080808181818EST)



TROUBLESHOOTING

As we have just designed and written this plugin, we are yet to find any problems with it. If you do have any problems, please visit the Australian Quality Solutions Group Forum and post in the relevant forum.


COPYRIGHT DISCLAIMER

"Simple Date/Time Plugin" (Version 1.0.0) - Australian Quality Solutions Group http://www.aqsg.com.au
- Developers: Joel Bassett
Comments
Search RSS
Only registered users can write comments!

Digg   del.icio.us   Facebook   Mixx   Google   kick.ie   Pownce   Slashdot   StumbleUpon   Technorati   Blogosphere News   Bumpzee   NewsVine   Reddit