menu

UWP

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DateTimeExtensions - UWP API Reference | Syncfusion

    Show / Hide Table of Contents

    Class DateTimeExtensions

    Contains the extension methods to get the total weeks in month/year, to find the StartOfWeek and to add TimeSpan value of appointment start and end time.

    Inheritance
    System.Object
    DateTimeExtensions
    Namespace: Syncfusion.UI.Xaml.Schedule
    Assembly: Syncfusion.SfSchedule.UWP.dll
    Syntax
    public static class DateTimeExtensions : Object

    Methods

    AddTimeSpan(DateTime, TimeSpan)

    Declaration
    public static DateTime AddTimeSpan(this DateTime datetime, TimeSpan timespan)
    Parameters
    Type Name Description
    System.DateTime datetime
    System.TimeSpan timespan
    Returns
    Type
    System.DateTime

    GetWeekOfMonth(DateTime)

    Declaration
    public static int GetWeekOfMonth(this DateTime time)
    Parameters
    Type Name Description
    System.DateTime time
    Returns
    Type
    System.Int32

    StartOfWeek(DateTime, DayOfWeek)

    Declaration
    public static DateTime StartOfWeek(this DateTime dt, DayOfWeek startOfWeek)
    Parameters
    Type Name Description
    System.DateTime dt
    System.DayOfWeek startOfWeek
    Returns
    Type
    System.DateTime

    SubractDays(DateTime, Int32)

    Declaration
    public static DateTime SubractDays(this DateTime dt, int days)
    Parameters
    Type Name Description
    System.DateTime dt
    System.Int32 days
    Returns
    Type
    System.DateTime

    SubtractDays(DateTime, Int32)

    Declaration
    public static DateTime SubtractDays(this DateTime datetime, int days)
    Parameters
    Type Name Description
    System.DateTime datetime
    System.Int32 days
    Returns
    Type
    System.DateTime

    WeeksInMonth(DateTime)

    Declaration
    public static int WeeksInMonth(this DateTime time)
    Parameters
    Type Name Description
    System.DateTime time
    Returns
    Type
    System.Int32
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved