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

XF 1.2 Language - Date Format

Discussion in 'XenForo Questions and Support' started by Amaury, Mar 1, 2014.

  1. Amaury

    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.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    No, there is no conditional statement for a specific month in a date string.
    Amaury likes this.
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

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

    Date formatting is handled by this helper function:


    Search for "helperDateTimeHtml".

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

    Amaury Well-Known Member

    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. :)

    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?

Share This Page