JK
Search Results for

    Show / Hide Table of Contents

    Class DateTimeOffsetExtensions

    Extension methods for the DateTimeOffset object.

    Inheritance
    System.Object
    DateTimeOffsetExtensions
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: JK.Common.Extensions
    Assembly: JK.Common.dll
    Syntax
    public static class DateTimeOffsetExtensions

    Methods

    | Improve this Doc View Source

    AddWorkDays(DateTimeOffset, in Int32)

    Adds given number of business days to a date.

    Declaration
    public static DateTimeOffset AddWorkDays(this DateTimeOffset dt, in int days)
    Parameters
    Type Name Description
    System.DateTimeOffset dt

    Current DateTimeOffset object from extension method.

    System.Int32 days

    Number of days to add (can be negative).

    Returns
    Type Description
    System.DateTimeOffset

    The date the given amount of business days from the start date.

    | Improve this Doc View Source

    GetAbbreviatedDayName(DateTimeOffset)

    Gets the abbreviated day name.

    Declaration
    public static string GetAbbreviatedDayName(this DateTimeOffset dt)
    Parameters
    Type Name Description
    System.DateTimeOffset dt

    Current DateTimeOffset object from extension method.

    Returns
    Type Description
    System.String

    Abbreviated day name.

    | Improve this Doc View Source

    GetAbbreviatedMonthName(DateTimeOffset)

    Gets the abbreviated month name.

    Declaration
    public static string GetAbbreviatedMonthName(this DateTimeOffset dt)
    Parameters
    Type Name Description
    System.DateTimeOffset dt

    Current DateTimeOffset object from extension method.

    Returns
    Type Description
    System.String

    Abbreviated month name.

    | Improve this Doc View Source

    GetDayName(DateTimeOffset)

    Gets the full name of a given day.

    Declaration
    public static string GetDayName(this DateTimeOffset dt)
    Parameters
    Type Name Description
    System.DateTimeOffset dt

    Current DateTimeOffset object from extension method.

    Returns
    Type Description
    System.String

    Full day name.

    | Improve this Doc View Source

    GetMonthName(DateTimeOffset)

    Gets the full name of a month.

    Declaration
    public static string GetMonthName(this DateTimeOffset dt)
    Parameters
    Type Name Description
    System.DateTimeOffset dt

    Current DateTimeOffset object from extension method.

    Returns
    Type Description
    System.String

    Full month name.

    | Improve this Doc View Source

    IsBetween(DateTimeOffset, in DateTimeOffset, in DateTimeOffset)

    Determines whether or not a given date is between (inclusive) the given start and end dates.

    Declaration
    public static bool IsBetween(this DateTimeOffset dt, in DateTimeOffset start, in DateTimeOffset end)
    Parameters
    Type Name Description
    System.DateTimeOffset dt

    Current DateTimeOffset object from extension method.

    System.DateTimeOffset start

    Start of date range to check

    System.DateTimeOffset end

    End of date range to check

    Returns
    Type Description
    System.Boolean

    True if date falls within range, otherwise false

    | Improve this Doc View Source

    IsWeekday(DateTimeOffset)

    Determines if given date is a weekday.

    Declaration
    public static bool IsWeekday(this DateTimeOffset dt)
    Parameters
    Type Name Description
    System.DateTimeOffset dt

    Current DateTimeOffset object from extension method.

    Returns
    Type Description
    System.Boolean

    True if is a weekday, otherwise false.

    | Improve this Doc View Source

    IsWeekend(DateTimeOffset)

    Determines if given date is a weekday.

    Declaration
    public static bool IsWeekend(this DateTimeOffset dt)
    Parameters
    Type Name Description
    System.DateTimeOffset dt

    Current DateTimeOffset object from extension method.

    Returns
    Type Description
    System.Boolean

    True if is a weekend, otherwise false.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © Jeremy Knight. Generated with DocFX