1
sighedwaise
piCal Coming Events block customize?
  • 2005/1/5 21:24

  • sighedwaise

  • Just popping in

  • Posts: 8

  • Since: 2004/6/8 2


I am trying to change the date format in the Coming Events block for piCal. It reads the date as (for example) "1st July", and I would like it to read as "July 1, 2004". I cannot find how to do this after much searching and tinkering on my own. Any help would be greatly appreciated!

2
evylrat
Re: piCal Coming Events block customize?
  • 2005/1/31 22:52

  • evylrat

  • Not too shy to talk

  • Posts: 164

  • Since: 2004/2/25


I'd be interested in knowing how to do this too.

3
diogenese
Re: piCal Coming Events block customize?
  • 2005/4/25 7:38

  • diogenese

  • Just popping in

  • Posts: 5

  • Since: 2005/4/13


For anyone still looking for an answer, try this ...

If you want to change '26th Apr' to 'Apr 26th', edit piCal/language/english/pical_constants.php, and change this:

define('_PICAL_FMT_MD','%2$s %1$s') ;

to this:

define('_PICAL_FMT_MD','%1$s %2$s') ;


If you want to change '26th Apr' to 'Apr 26th 2005' edit piCal/class/piCal_xoops.php, and change this code in function get_block_array_coming_event (line 398):

$start_desc = sprintf( _PICAL_FMT_MD , $this->month_middle_names[ date( 'n' , $start_for_date ) ] , $this->date_long_names[ date( 'j' , $start_for_date ) ] ) ;

to this:

$start_desc = sprintf( _PICAL_FMT_YMD , $this->year, $this->date_long_names[ date( 'j' , $start_for_date ) ], $this->month_middle_names[ date( 'n' , $start_for_date ) ] ) ;

Hope someone finds this useful.

Ed

Login

Who's Online

93 user(s) are online (38 user(s) are browsing Support Forums)


Members: 0


Guests: 93


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits