Class DateTimeExtensions
- Namespace
- GroupeIsa.Neos.Shared.Extensions
- Assembly
- GroupeIsa.Neos.Shared.dll
Provides extensions methods for the DateTime type.
public static class DateTimeExtensions
- Inheritance
-
DateTimeExtensions
- Inherited Members
Methods
EndOfDay(DateTime)
Returns the end of the day for the specified date, changing the time component to 23:59:59.999.
public static DateTime EndOfDay(this DateTime date)
Parameters
dateDateTimeThe current date.
Returns
EndOfMonth(DateTime)
Returns the last day of the month of the specified date, changing the time component to 23:59:59.999.
public static DateTime EndOfMonth(this DateTime date)
Parameters
dateDateTimeThe current date.
Returns
EndOfWeek(DateTime)
Returns the last day of the week of the specified date, changing the time component to 23:59:59.999.
public static DateTime EndOfWeek(this DateTime date)
Parameters
dateDateTimeThe current date.
Returns
EndOfWeek(DateTime, DayOfWeek)
Returns the last day of the week of the specified date, changing the time component to 23:59:59.999.
public static DateTime EndOfWeek(this DateTime date, DayOfWeek firstDayOfWeek)
Parameters
Returns
EndOfYear(DateTime)
Returns the last day of the year of the specified date, changing the time component to 23:59:59.999.
public static DateTime EndOfYear(this DateTime date)
Parameters
dateDateTimeThe current date.
Returns
StartOfDay(DateTime)
Returns the beginning of the day for the specified date, changing the time component to 00:00:00.000.
public static DateTime StartOfDay(this DateTime date)
Parameters
dateDateTimeThe current date.
Returns
StartOfMonth(DateTime)
Returns the first day of the month of the specified date, changing the time component to 00:00:00.000.
public static DateTime StartOfMonth(this DateTime date)
Parameters
dateDateTimeThe current date.
Returns
StartOfWeek(DateTime)
Returns the first day of the week of the specified date, changing the time component to 00:00:00.000.
public static DateTime StartOfWeek(this DateTime date)
Parameters
dateDateTimeThe current date.
Returns
StartOfWeek(DateTime, DayOfWeek)
Returns the first day of the week of the specified date, changing the time component to 00:00:00.000.
public static DateTime StartOfWeek(this DateTime date, DayOfWeek firstDayOfWeek)
Parameters
Returns
StartOfYear(DateTime)
Returns the first day of the year of the specified date, changing the time component to 00:00:00.000.
public static DateTime StartOfYear(this DateTime date)
Parameters
dateDateTimeThe current date.