• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

As designed Date format for "Joined" and "Birthday"

twollert

Active member
#1
I chose the date format "d. F Y" in the ACP, so it should be e.g. "01. April 1970" (German format).

If the user don't allow to see the age, the birthday is shown as "April 1" (instead of "01. April").
 

Brogan

XenForo moderator
Staff member
#2
Is that format supported by the PHP date function?
I don't see it listed here: http://php.net/manual/en/function.date.php

Edit: Ah yes, it's shown in the examples:
Code:
$today = date("m.d.y");                         // 03.10.01
Although interestingly, it lists "d" as 2 digits with leading zeros, which your example doesn't have.
Have you tried using "j." ?
 

twollert

Active member
#3
"d. F Y" is working well in all other areas of the forum, e.g.:

xenforo_dateformat.png

Only in the field "Birthday" (without the year!) the format isn't correct. So, I think it's a XenForo bug.

Although interestingly, it lists "d" as 2 digits with leading zeros, which your example doesn't have.
Sorry, that was my mistake. I edited my original post.
 

Kier

XenForo Developer
Staff member
#4
We actually hard-code the birthday format for the day-month only format, so strictly speaking this is working as designed.
 

Kier

XenForo Developer
Staff member
#6
Sorry, but this won't work in many parts of the world and in 2011 we call this a bug :)
What won't work? We return a localized version of date('F j'), so it will respond to translation - where's the serious limitation there?
 

Mike

XenForo developer
Staff member
#8
Can you explain this part, please? (Is there a phrase "F j" which I can change to "d. F"?)
It's just the internal reference for "birthday" date types. You can explicitly override the type in the template, if it's that significant.

Kier was trying to get more info on the underlying problem. While we could expose this as a format type, it's for one place in the entire application. We try to avoid that. It may not be ideal, but is the current format acceptable?