Class DateTimeExtensions
- Namespace
- Tripous
- Assembly
- Tripous.dll
Extensions
public static class DateTimeExtensions
- Inheritance
-
DateTimeExtensions
- Inherited Members
Methods
EndOfDay(DateTime)
Returns the end date-time of DT, i.e yyyy-MM-dd 23:59:59.9999999
public static DateTime EndOfDay(this DateTime DT)
Parameters
DTDateTime
Returns
GetWeekNumber(DateTime)
Returns the week number the specified date falls in
public static int GetWeekNumber(this DateTime DT)
Parameters
DTDateTime
Returns
GetWeekNumber(DateTime, CultureInfo)
Returns the week number the specified date falls in
public static int GetWeekNumber(this DateTime DT, CultureInfo CI)
Parameters
DTDateTimeCICultureInfo
Returns
StartOfDay(DateTime)
Returns the start date-time of DT, i.e. yyyy-MM-dd 00:00:00
public static DateTime StartOfDay(this DateTime DT)
Parameters
DTDateTime
Returns
StartOfWeek(DateTime)
Returns the date of the first day of the week of the specified date
public static DateTime StartOfWeek(this DateTime DT)
Parameters
DTDateTime
Returns
StartOfWeek(DateTime, CultureInfo)
Returns the date of the first day of the week of the specified date
public static DateTime StartOfWeek(this DateTime DT, CultureInfo CI)
Parameters
DTDateTimeCICultureInfo
Returns
ToFileName(DateTime)
Creates and returns a file name based on DT
The returned string has the format
yyyy-MM-dd HH_mm_ss
public static string ToFileName(this DateTime DT)
Parameters
DTDateTime
Returns
ToFileName(DateTime, bool)
Creates and returns a file name based on DT.
The returned string has the format
yyyy-MM-dd HH_mm_ss__fff
public static string ToFileName(this DateTime DT, bool UseMSecs)