We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38930
    • 19 Posts
    Hi everybody,
    I want to show in a chunk only the month of the pub_date. Searching in the web, I find only this script:
    [[*createdon:strtotime:date=`%B`]]
    I've trying to change "createdon" with "publishedon", but doesn't give me a result.

    I also ask y where I can change the language of the dates, from en to italian.

    Thanks in advance.
      • 22427
      • 793 Posts
      First: Dont mix up pub_date and publishedon; see
      http://bobsguides.com/published-on-publish-date-confusion.html
      for details.

      Second: The value of publishedon for a freshly created resource is 0.
      It will get a different value only in the case that
      • there is a set pub_date
      • and the pub_date lies in the past (at the moment of the request of the resource)
        • 22427
        • 793 Posts
        I just found:
        [[*createdon:strtotime:date=`%B`]]
        gives an empty output.

        But when you insert a blank before %B, it works:
        [[*createdon:strtotime:date=` %B`]]

        Someone around here able to explain this?