| FileTargetCalculateNextWeekday Method |
Calculate the DateTime of the requested day of the week.
Namespace:
NLog.Targets
Assembly:
NLog (in NLog.dll) Version: 5.3.4+73d83d3161d31288ca5c554cc50d27b6bed5f28b
Syntax public static DateTime CalculateNextWeekday(
DateTime previousLogEventTimestamp,
DayOfWeek dayOfWeek
)
Public Shared Function CalculateNextWeekday (
previousLogEventTimestamp As DateTime,
dayOfWeek As DayOfWeek
) As DateTime
Dim previousLogEventTimestamp As DateTime
Dim dayOfWeek As DayOfWeek
Dim returnValue As DateTime
returnValue = FileTarget.CalculateNextWeekday(previousLogEventTimestamp,
dayOfWeek)
static member CalculateNextWeekday :
previousLogEventTimestamp : DateTime *
dayOfWeek : DayOfWeek -> DateTime
Parameters
- previousLogEventTimestamp
- Type: SystemDateTime
The DateTime of the previous log event. - dayOfWeek
- Type: SystemDayOfWeek
The next occurring day of the week to return a DateTime for.
Return Value
Type:
DateTimeThe DateTime of the next occurring dayOfWeek.
Remarks For example: if previousLogEventTimestamp is Thursday 2017-03-02 and dayOfWeek is Sunday, this will return
Sunday 2017-03-05. If dayOfWeek is Thursday, this will return *next* Thursday 2017-03-09.
See Also