Aether Utilities Aether Utilities
Aether Utilities Aether Utilities
DocFX + Singulink = ♥

Search Results for

    Edit this page

    Class TimeExtensions

    Namespace
    AetherUtils.Core.Extensions
    Assembly
    AetherUtils.Core.dll
    Provides extension methods for manipulating various time related objects.
    [UsedImplicitly]
    public static class TimeExtensions
    Inheritance
    object
    TimeExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()

    Methods

    EndOfMonth(DateTime)

    Get the ending DateTime of the month based on the supplied DateTime.
    [UsedImplicitly]
    public static DateTime EndOfMonth(this DateTime date)

    Parameters

    date DateTime
    The DateTime representing the current date for the month.

    Returns

    DateTime
    A DateTime representing the end of the month.

    Exceptions

    ArgumentNullException
    If the date was null.

    StartOfMonth(DateTime)

    Get the starting DateTime of the month based on the supplied DateTime.
    [UsedImplicitly]
    public static DateTime StartOfMonth(this DateTime date)

    Parameters

    date DateTime
    The DateTime to get the start of the month of.

    Returns

    DateTime
    A DateTime representing the start of the month.

    StartOfWeek(DateTime)

    Get the starting DateTime of the week based on the supplied DateTime.
    [UsedImplicitly]
    public static DateTime StartOfWeek(this DateTime date)

    Parameters

    date DateTime
    The DateTime to get the start of the week of.

    Returns

    DateTime
    A DateTime representing the start of the week.

    TimeSpanToString(TimeSpan)

    Get a string representing the TimeSpan in the form of:

    w day(s), x hour(s), y minute(s), z second(s)

    [UsedImplicitly]
    public static string TimeSpanToString(this TimeSpan timeSpan)

    Parameters

    timeSpan TimeSpan
    The TimeSpan to convert.

    Returns

    string
    A string representing the TimeSpan.

    Exceptions

    ArgumentNullException
    If timeSpan was null.
    (c) 2024 Ethan Hann. All rights reserved.