Announcement

Collapse
No announcement yet.

Code for rendering 30 days from today's date (e.g.: yyyy-mm-dd)?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Code for rendering 30 days from today's date (e.g.: yyyy-mm-dd)?

    What is the code for rendering 30 days from today's date in this format yyyy-mm-dd?

    Example:

    Today's Date: 2020-05-18 + 30 Days = Render "2020-06-17"
    Thank you, Bill Davis

    #2
    Code:
    <mvt:assign name="g.todayPlusThirty" value="s.time_t + 2592000"/>
    
    <mvt:assign name = "l.settings:pm:month" value = "padl( time_t_month( g.todayPlusThirty, 'local' ), 2, '0' )" />
    <mvt:assign name = "l.settings:pm:day"   value = "padl( time_t_dayofmonth( g.todayPlusThirty, 'local' ), 2, '0' )" />
    <mvt:assign name = "l.settings:pm:year"  value = "time_t_year( g.todayPlusThirty, 'local' )" />
    
    <p>Thirty Days from Now: &mvt:pm:month;/&mvt:pm:day;/&mvt:pm:year; </p>
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      Very helpful today Bruce, thanks for posting your code.
      Highly caffeinated
      http://www.coffeehouseexpress.com

      Comment


        #4
        In deed!
        Thank you, Bill Davis

        Comment

        Working...
        X