Class DateTimeExtensions
Extension methods for date and time System.DateTime.
Inheritance
System.Object
DateTimeExtensions
Namespace: Kros.Extensions
Assembly: Kros.Utils.dll
Syntax
public static class DateTimeExtensions
Methods
FirstDayOfCurrentMonth()
Returns first day of current month.
Declaration
public static DateTime FirstDayOfCurrentMonth()
Returns
Type | Description |
---|---|
System.DateTime | Date. |
FirstDayOfMonth(DateTime)
Returns date, which is the first day in month and year in input value
. Time component is nulled.
Declaration
public static DateTime FirstDayOfMonth(this DateTime value)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | value | Date, to which the first day of month is returned. |
Returns
Type | Description |
---|---|
System.DateTime | Date. |
LastDayOfCurrentMonth()
Returns last day of current month.
Declaration
public static DateTime LastDayOfCurrentMonth()
Returns
Type | Description |
---|---|
System.DateTime | Date. |
LastDayOfMonth(DateTime)
Returns date, which is the last day in month and year in input value
. Time component is nulled.
Declaration
public static DateTime LastDayOfMonth(this DateTime value)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | value | Date, to which the last day of month is returned. |
Returns
Type | Description |
---|---|
System.DateTime | Date. |