Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2009
    Posts
    124

    Unanswered: Dtaes: one year from the last day of this month

    This code returns the last day of the current month:
    <?PHP $dtLastDay = date("j/n/Y", mktime(0, 0, 0, date("m")+1 , date("d")-date("d"), date("Y"))); ?>

    What I need is to add one year to this date. OR the last day of the current month one year from now.

    Help would be very much appreciated!

    Nick

  2. #2
    Join Date
    Mar 2007
    Location
    010101010110100
    Posts
    803
    Try this:

    Code:
    $current_date = date("Y-m-d");
    $future_date = strtotime(date("Y-m-d", strtotime($current_date)) . " +1 year");
    echo date('m-d-Y', $future_date);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •