Lotus Software logo
IBM Lotus Domino Designer 8.5
  Versions 8.5 and 8.5.1






adjustYear method

Increments a date-time by the number of years you specify.

Defined in

DateTime

Syntax

public void adjustYear(int n)

throws NotesException
public void adjustYear(int n, boolean preservelocaltime)

throws NotesException

Parameters

int n

The number of years by which to increment the date-time. Can be positive or negative.

boolean preservelocaltime

Affects adjustments that cross a daylight-saving time boundary. Specify true to increment or decrement the GMT time by one hour such that a 24-hour adjustment yields the same local time in the new day. If this parameter is false or omitted, GMT time remains as adjusted and local time gains or loses an hour.

Usage

If the DateTime object consists of only a time component, this method has no effect.

The number of years by which you increment a DateTime object can cause the century to change. If this happens, the year is represented as a string with four digits instead of two, such as 08/18/2001.

Language cross-reference

AdjustYear method in LotusScript NotesDateTime class

@Adjust function in formula language

See examples

Examples: adjustYear method
Related topics
Working with time




Library | Support | Terms of use |

Last updated: Monday, October 5, 2009