Collapse All

Anypia Programmer's Documentation |  |

Date::addYears Method
Date Class Date Members Date Methods Send Feedback

Adds years to the specified date.

C++

    static boost::gregorian::date addYears(
        boost::gregorian::date theDate,
        int years
    );

Parameters

Parameters | Description
boost::gregorian::date theDate | The date to add to.
int years | The number of years to add.

Returns

The incremented date.

Remarks

The years could be negative. A day of February 29 is changed to February 28 to be sure there is no leap-year problem.

Group

Date Methods

Links
Date Class, Date Members, Date Methods

Copyright (c) 2010. All rights reserved.
Contents | Index | Home
What do you think about this topic? Send feedback!