adjustDay (NotesDateTime - JavaScript)

Increments a date-time by a number of days.

Defined in

NotesDateTime

Syntax

adjustDay(n:int) : void

adjustDay(n:int, preserveLocalTime:boolean) : void

Parameter Description
n The number of days by which to increment the date-time. Can be positive or negative.
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 NotesDateTime object consists of only a time component, this method has no effect.

The number of days by which you increment a NotesDateTime object may affect the month and year.

Examples

This computed field increments a date-time value.
var dt:NotesDateTime = session.createDateTime("Today");
dt.adjustDay(14);
return "Due date: " + dt.getDateOnly();