Class DateTimeUtilities
Utilities for date and time manipulation.
This class is intended for internal use and should not be used directly in third-party appliations.
Inheritance
Inherited Members
Namespace: Sdl.LanguagePlatform.Core
Assembly: Sdl.LanguagePlatform.Core.dll
Syntax
public static class DateTimeUtilities
Methods
Normalize(DateTime)
Normalizes the date to UTC, unless dt
's date is already specified in UTC.
Declaration
public static DateTime Normalize(DateTime dt)
Parameters
Type | Name | Description |
---|---|---|
Date |
dt | The date to normalize |
Returns
Type | Description |
---|---|
Date |
The UTC-normalized date, or the identical value if the date is already in UTC. |
TryParseWithFallback(String, out DateTime)
Attempts to parse the specified string into a System.
Declaration
public static bool TryParseWithFallback(string s, out DateTime result)
Parameters
Type | Name | Description |
---|---|---|
String | s | The input string |
Date |
result | If the method returns |
Returns
Type | Description |
---|---|
Boolean |
|