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

  • 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

    Working...
    X

    This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

    This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.

    Accept