MyBB Community Forums

Full Version: Date
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Using the 'Date and Time Formats' feature in the Admin CP, is it possible to change the settings for the 'Date Format' field to be Day of the week - Month - Year, I think having settings like that makes it easier for some people to understand, I would prefer to have that too.

Also, can this be done for the 'Registered Date Format'?

If it can't be done within the settings in the Admin CP, how can I do this with core file edits?

Thank you.
http://protectionforums.com
ACP » Configuration » Date and Time Formats

Use http://php.net/manual/en/function.date.php for reference.
In /inc/init.php, scroll down and you will see an array called $date_formats. You can add date formats there:
	1 => "m-d-Y",
	2 => "m-d-y",
	3 => "m.d.Y",
	4 => "m.d.y",
	5 => "d-m-Y",
	6 => "d-m-y",
	7 => "d.m.Y",
	8 => "d.m.y",
	9 => "F jS, Y",
	10 => "l, F jS, Y",
	11 => "jS F, Y",
	12 => "l, jS F, Y", // <---- don't forget the comma here !!!!
	13 => "w F jS, Y", // Monday January 1st, 2011
}
Thanks Disturbed, that worked perfectly.

Thanks Aries-Belgium too, I used the other method as it seemed more logical.


Is it possible to add things like 'th' 'nd' after the date of the month? As 14 May 2011 sounds a little weird, so instead, have it as '14th May 2011'.



(2011-05-14, 02:24 PM)Morsec0de Wrote: [ -> ]Is it possible to add things like 'th' 'nd' after the date of the month? As 14 May 2011 sounds a little weird, so instead, have it as '14th May 2011'.

jS F Y