Class DTHelperFormalized
- Namespace
- SunamoDateTime.DT
- Assembly
- SunamoDateTime.dll
Provides methods for formatting and parsing DateTime values in formalized ISO-like formats (yyyy-MM-dd).
public class DTHelperFormalized
- Inheritance
-
DTHelperFormalized
- Inherited Members
- Extension Methods
Methods
DateTimeToStringDashed(DateTime)
Formats a DateTime as a dashed date string (yyyy-MM-dd). Alias for DateTimeToStringFormalizeDate.
public static string DateTimeToStringDashed(DateTime dt)
Parameters
dtDateTimeThe DateTime to format
Returns
- string
Dashed date string
DateTimeToStringFormalizeDate(DateTime)
1989-06-21
public static string DateTimeToStringFormalizeDate(DateTime dt)
Parameters
dtDateTime
Returns
FormatDateTime(DateTime, DateTimeFormatStyles)
2011-10-18 10:30
public static string FormatDateTime(DateTime dt, DateTimeFormatStyles fullCalendar)
Parameters
dtDateTimefullCalendarDateTimeFormatStyles
Returns
IsFormalizedDate(string)
Checks whether the text can be parsed as a formalized date.
public static bool IsFormalizedDate(string text)
Parameters
textstringThe text to check
Returns
- bool
True if the text is a valid formalized date, false otherwise
StringToDateTimeFormalizeDate(string)
Is used in GpxTrackFile 2018-08-10T11:33:19Z
public static DateTime StringToDateTimeFormalizeDate(string text)
Parameters
textstringDateTime string in formalized format