XF 1.2 Language - Date Format

Amaury

Well-known member
Some people like to use the written out, but short, format for dates -- for example, Mar. 1, 2014. That's XenForo's default format, minus the period.

As stated, XenForo excludes the period. If I use the same format XenForo has (e.g., Mar 1, 2014), but add a period, it works. The problem is that then for May, the only month that's only three letters and therefore has no abbreviation, I would get May. 1, 2014.

Is there some language conditional, if such a thing exists, that I could use to exclude the period only on May?

I personally favor the numerical format, but I'd just like to know for future reference.
 
If I use the same format XenForo has (e.g., Mar 1, 2014), but add a period, it works.

What works exactly? It's unclear what and why.

Date formatting is handled by this helper function:

library/XenForo/Template/Helper/Core.php

Search for "helperDateTimeHtml".

It is possible to implement your condition with custom PHP code if you want to go there.
 
What works exactly? It's unclear what and why.

I meant work as in if I have M. j, Y, it'll display Mar. 1, 2014, but anything with May in it will display as May. 1, 2014 rather than May 1, 2014. :)

Date formatting is handled by this helper function:

library/XenForo/Template/Helper/Core.php

Search for "helperDateTimeHtml".

It is possible to implement your condition with custom PHP code if you want to go there.

I'll have @Nights take a look next time he's on. He might know. Advanced PHP is not my field. What would the condition be, though?
 
Top Bottom