Was this page helpful?

Date.AddDays

    Table of contents
    1. 1. Usage Restrictions
    2. 2. Parameters
    3. 3. Result
    4. 4. Samples
    date.AddDays(datetime : str, days : num) : str

    Adds the specified number of days to a date and returns the result.  The number of days can be positive or negative. 

    Usage Restrictions

    1.9.1 or later.

    Parameters

    Name Type Description
    datetime
    str The date to which to add days.
    days
    num
    The number of days to add.

    Result

    A new date.

    Samples


    Output

    To add 1 day to the current date:

    {{ date.AddDays(date.now, 1) }} 

    Sat, 26 May 2012 08:00:18 GMT

    To subtract 1 day from a constant date:

    {{ date.AddDays("01/01/2000", -1) }} 

    Fri, 31 Dec 1999 00:00:00 GMT

    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by