Hans wrote:
Monday, March 26, 2007, 4:40:01 PM, Sergio wrote:

  
Hi, I get each day page the "YYYYMMDD" title, with really I hate it, more even
beacuse I speak spanish, where/how should I (could) change in order to get
somethihg to "25-03-07" for each day page?
    

You could keep using the YYYMMDD format for the page names, but use a
different title format, so it displays nice:

Nice date titles:

add to config.php or local config file:

# add PageVariable {$DMYTitle}
$FmtPV['$DMYTitle'] = 'DMYTitle($pagename)';
function DMYTitle($pagename) {
    $title = PageVar($pagename, '$Title');
    preg_match("/(\d\d\d\d)(\d\d)(\d\d)/",$pagename,$m);
    if(!$m[1]) return $title; 
    $tdate = mktime(0,0,0,$m[2],$m[3],$m[1]);
    return strftime("%d %B %Y",$tdate);
}

then put into the calendar GroupHeader page:

(:title {$DMYTitle}:)

  
Wow, that works nice.  Seems it ought to be part of the regular PMcal code, with some mention that
 "return strftime("%d %B %Y",$tdate);" can be switched to "return strftime("%B %d %Y",$tdate);" to get the format displayed of month day year. 
-- 

Always, Dr Fred C
[EMAIL PROTECTED]
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to