We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10189
    • 109 Posts
    We’ve just noticed that when setting the date format in Ditto (using &dateFormat in the snippet call) and we want day of the month without leading zeros (according to PHP date format that would be " j "), we seem to get a very odd number (317, when the date actually is november 13, 2009).

    My reference for PHP date formats: http://php.net/manual/en/function.date.php

    Anyone who can explain what goes wrong? smiley
      • 1122
      • 209 Posts
      Ditto formats timestamps with the use of "strftime" function and therefore you need to refer this function instead of "date". The correct modifier for the day without leading zero -- within "strftime" function -- is "%e". "%j" stands for day of year (0..366), so your strange number is quite correct.
        • 10189
        • 109 Posts
        I’m a moron. I did not read the documentation properly! Thanks! laugh