[pmwiki-users] Pm Calc Day

Sergio Belkin sebelk at gmail.com
Mon Mar 26 12:51:14 CDT 2007


--- El Lunes, 26 de Marzo de 2007 13:25, Hans encontró un teclado y tipeó lo 
siguiente: 
> Ha: Monday, March 26, 2007, 4:40:01 PM, Sergio wrote:
> Ha:
> Ha: > Hi, I get each day page the "YYYYMMDD" title, with really I hate it,
> more even Ha: > beacuse I speak spanish, where/how should I (could) change
> in order to get Ha: > somethihg to "25-03-07" for each day page?
> Ha:
> Ha: You could keep using the YYYMMDD format for the page names, but use a
> Ha: different title format, so it displays nice:
> Ha:
> Ha: Nice date titles:
> Ha:
> Ha: add to config.php or local config file:
> Ha:
> Ha: # add PageVariable {$DMYTitle}
> Ha: $FmtPV['$DMYTitle'] = 'DMYTitle($pagename)';
> Ha: function DMYTitle($pagename) {
> Ha:     $title = PageVar($pagename, '$Title');
> Ha:     preg_match("/(\d\d\d\d)(\d\d)(\d\d)/",$pagename,$m);
> Ha:     if(!$m[1]) return $title;
> Ha:     $tdate = mktime(0,0,0,$m[2],$m[3],$m[1]);
> Ha:     return strftime("%d %B %Y",$tdate);
> Ha: }
> Ha:
> Ha: then put into the calendar GroupHeader page:
> Ha:
> Ha: (:title {$DMYTitle}:)
> Ha:
> Ha:
> Ha:
> Ha: Hans
> Ha:
> Ha:
Thanks! I will try it!
-- 
Sergio Belkin
Soluciones Informáticas Open Source
Community Site http://www.openkairos.com
Blog http://sebelk.blogspot.com
----------------------------------------



More information about the pmwiki-users mailing list