Version

GetNextDate(DateTime,Boolean) Method

Returns the next or previous date as relative to the specified date.
Syntax
'Declaration
 
Public Overridable Function GetNextDate( _
   ByVal date As Date, _
   ByVal forward As Boolean _
) As Date
public virtual DateTime GetNextDate( 
   DateTime date,
   bool forward
)

Parameters

date
The date on which the return value is based.
forward
Boolean which specifies whether to proceed forward or backward along the timeline, as relative to the specified date.
Remarks

The default implementation adds or subtracts (depending on the value of forward) the TimeSpan returned from the NormalSpan property to or from the specified date. Derived classes which represent intervals that can vary in duration can override the GetNextDate method to handle the variations as appropriate for that interval.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also