1
Saqitus
Date Format
  • 2011/8/16 22:19

  • Saqitus

  • Just popping in

  • Posts: 9

  • Since: 2011/8/14


Good evening,

I was wondering in which file I might be able to change the date format.
Currently it is set to y/m/d
Is there a way to change this to dd/mm/yyyy

Thanks,

Simon

2
zyspec
Re: Date Format
  • 2011/8/16 22:49

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


You can change the default date format in the global.php language file. So for english it is in ./language/english/global.php. You'll find 3 defines around line 174-176 (_DATESTRING, _MEDIUMDATESTRING, and _SHORTDATESTRING). You'll see _SHORTDATESTRING is set to 'Y/n/j' - you'll want to change that to 'd/m/Y'. You'll want to make similar changes to the _DATESTRING and _MEDIUMDATESTRING defines.

3
redheadedrod
Re: Date Format

Quote:

zyspec wrote:
You can change the default date format in the global.php language file. So for english it is in ./language/english/global.php. You'll find 3 defines around line 174-176 (_DATESTRING, _MEDIUMDATESTRING, and _SHORTDATESTRING). You'll see _SHORTDATESTRING is set to 'Y/n/j' - you'll want to change that to 'd/m/Y'. You'll want to make similar changes to the _DATESTRING and _MEDIUMDATESTRING defines.


Once you do this you may find some modules still show the wrong date format. if you do you need to find the templates that show them and change the templates in the same manner.

4
Peekay
Re: Date Format
  • 2011/8/17 7:55

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Users have struggled with this for years. Embarrassing that it isn't an install or admin pref. I have added it to the 2.6 wishlist.
A thread is for life. Not just for Christmas.

5
redheadedrod
Re: Date Format

Yes it would be a good inclusion for 2.6.

6
Saqitus
Re: Date Format
  • 2011/8/24 20:30

  • Saqitus

  • Just popping in

  • Posts: 9

  • Since: 2011/8/14


That has worked a treat - TAHNK YOU very much for your help.

Best wishes,

Pete

Login

Who's Online

451 user(s) are online (353 user(s) are browsing Support Forums)


Members: 0


Guests: 451


more...

Donat-O-Meter

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

Latest GitHub Commits