• To use this plugin with custom date format on date_add and date_sub here is how to easily fix it.
    Go to the Plugins -> Plugin Editor then select Date Calculator. You are now on editable date-calculator.php

    FOR date_add
    There you need to find line 203 and replace with this code:
    $datecalc = date($format, mktime(0, 0, 0, date(“m”)+$month, date(“d”)+$day, date(“Y”)+$year));

    FOR date_sub
    Find line 244 and replace with this code:
    $datecalc = date($format, mktime(0, 0, 0, date(“m”)-$month, date(“d”)-$day, date(“Y”)-$year));

    Now you can use custom date format.

  • The topic ‘FIX: Custom date format with date_add and date_sub’ is closed to new replies.