Show / Hide Table of Contents

Class CalendarExtensions

Extension methods for the Calendar

Inheritance
object
CalendarExtensions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: PayrollEngine.Client.Scripting.Runtime.Api
Assembly: PayrollEngine.Client.Services.dll
Syntax
public static class CalendarExtensions
Remarks

Duplicate of the backend calendar extension (no holiday support)

Methods

View Source

GetNextWorkDays(Calendar, DateTime, int)

Get next working days

Declaration
public static List<DateTime> GetNextWorkDays(this Calendar calendar, DateTime moment, int count = 1)
Parameters
Type Name Description
Calendar calendar
DateTime moment

The start moment (not included in results)

int count

The number of days (default: 1)

Returns
Type Description
List<DateTime>

Returns true for valid time units

View Source

GetPreviousWorkDays(Calendar, DateTime, int)

Get previous working days

Declaration
public static List<DateTime> GetPreviousWorkDays(this Calendar calendar, DateTime moment, int count = 1)
Parameters
Type Name Description
Calendar calendar
DateTime moment

The start moment (not included in results)

int count

The number of days (default: 1)

Returns
Type Description
List<DateTime>

Returns true for valid time units

View Source

IsWorkDay(Calendar, DateTime)

Test for working days

Declaration
public static bool IsWorkDay(this Calendar calendar, DateTime moment)
Parameters
Type Name Description
Calendar calendar
DateTime moment

Test day

Returns
Type Description
bool

Returns true for valid time units

  • View Source
☀
☾
Back to top Generated by DocFX