1
elgrillo
Agenda-x Date format - How do I change?
  • 2004/12/28 19:22

  • elgrillo

  • Just popping in

  • Posts: 10

  • Since: 2004/12/18


Hello Everyone!

Currently, my Agenda calender module diaplays the date in this format:
"Today is 2004 December 28 Tuesday"

How do I change the format to read:
"Today is Tuesday, December 28th"

I see the "$agendax.date" smarty tag within the template, but I'm not versed enough with Smarty to understand where I would make the change.

Also, the "Thisweek_block" displays any reacurring events by including a "(reocurring)" link, this is cool except it doesn't state on what day the event is reoccuring! Any ideas of how I could replace or add to the (recurring) link?


Thanks in advance for any help!!

2
weeble
Re: Agenda-x Date format - How do I change?
  • 2005/1/6 16:01

  • weeble

  • Just popping in

  • Posts: 3

  • Since: 2005/1/6 1


I'm a complete n00b to XOOPS and all that goes with it. I also wanted to change this as it's not a logical format for my users to follow.

I'll probably be burnt at the stake for the way I did it but I just changed the code in the index.php file so that no matter what the _SHORTDATESTRING result was, the format was the same for all three options (n/j/Y, j/n/Y, Y/n/j) [where j=day, n=month & Y=year]. I know I should have found the file where the string is defined, but I've been up for too long and I got tired of looking at the screen.

Anyhow, my index.php now contains the following (I'm sure you'll find the part I'm referring to):
if (_SHORTDATESTRING == "n/j/Y") {        

      
$date_str .= _($week[$weekday]).' '.$d.$dateSuffix['ri'].' '._($maand[$m]).' '.$y.$dateSuffix['nian'];              

  } elseif (
_SHORTDATESTRING == "j/n/Y") {
      
      
$date_str .= _($week[$weekday]).' '.$d.$dateSuffix['ri'].' '._($maand[$m]).' '.$y.$dateSuffix['nian'];    
        
  } else {          
//default to "Y/n/j"
  
      
$date_str .= _($week[$weekday]).' '.$d.$dateSuffix['ri'].' '._($maand[$m]).' '.$y.$dateSuffix['nian'];    
      
  }


The result? --> Today is Thursday 6 January 2005

It's not pretty but it works for me

3
Franki
Re: Agenda-x Date format - How do I change?
  • 2005/1/12 6:34

  • Franki

  • Just popping in

  • Posts: 8

  • Since: 2004/10/18


It uses the _SHORTDATESTRING definition in /xoops/language/english/global.php - so unless you want to hack the agenda-x codes, make sure yours is defined (in the above file) using any of the 3 letters and forward slash, e.g j/n/Y, n/j/Y, etc...

[ it won't work if you do not use those 3 letters separated by forward slash (j, n or Y)]

4
elgrillo
Re: Agenda-x Date format - How do I change?
  • 2005/1/14 16:48

  • elgrillo

  • Just popping in

  • Posts: 10

  • Since: 2004/12/18


THANK YOU!!!!

5
elgrillo
Re: Agenda-x Date format - How do I change?
  • 2005/1/20 0:59

  • elgrillo

  • Just popping in

  • Posts: 10

  • Since: 2004/12/18


Hello,

Thank you for your help with my date issue!

I have one more question regarding how the date is displayed.
Currently the date reads: i.e. 1/21/2005

I want the date to be displayed as: Wednesday, Jan. 21

Any ideas?

Thanks in advance for any help!

Login

Who's Online

254 user(s) are online (175 user(s) are browsing Support Forums)


Members: 0


Guests: 254


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