[Home]WikiPatches/InternationalDateTime

UseModWiki | WikiPatches | RecentChanges | Preferences

The 1.0.5 release will contain zero padding en NumberDates closely compatible with ISO 8601 standard. Suggested by GunnarH and added thanks to MarkusLude. See WikiBugs/NumericDatesNeedZeroPadding.


The 1.0 release will contain the $NumberDates option, which will output dates like "2003-7-16" if enabled. --CliffordAdams


This will output "Last edited 2001-05-31 17:44 CEST" instead of "Last edited May 31, 2001 5:44 pm" at the bottom of pages, and on RecentChanges.

Patch:

package UseModWiki;
use strict;
local $| = 1;   # Do not buffer output (localized for mod_perl)
#%%
use POSIX;      # strftime
...
sub CalcDay {
  my ($ts) = @_;
  $ts += $TimeZoneOffset;
# my ($sec, $min, $hour, $mday, $mon, $year) = localtime($ts);
# return ("January", "February", "March", "April", "May", "June",
#         "July", "August", "September", "October", "November",
#         "December")[$mon]. " " . $mday . ", " . ($year+1900);
#%%
  return ( strftime "%Y-%m-%d", localtime($ts) );
}
--HaJoGurt Hans, I've put this into my CVS usemod at 203.79.72.169 as detailed in /Templates -- timeless

UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited July 18, 2009 7:50 pm by JuanmaMP (diff)
Search: