Created
April 27, 2016 11:57
-
-
Save margusmartsepp/0601b762a418a757501673be541321b8 to your computer and use it in GitHub Desktop.
Is date after epoch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// https://en.wikipedia.org/wiki/Epoch_(reference_date) | |
/// </summary> | |
public static class DateTimeValidator | |
{ | |
public static DateTime Epoch => Epoch1900; | |
public readonly static DateTime Epoch1900 = new DateTime(1900, 1, 1); | |
public readonly static DateTime EpochSqlDateTime = (DateTime)SqlDateTime.MinValue; | |
public static bool IsValid(DateTime dateTime) | |
{ | |
return dateTime >= Epoch; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment