Created
January 20, 2012 10:01
-
-
Save marek-safar/1646514 to your computer and use it in GitHub Desktop.
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
using System; | |
using System.Globalization; | |
class C | |
{ | |
public static void Main () | |
{ | |
const DateTimeStyles DefaultStyles = DateTimeStyles.AssumeUniversal | DateTimeStyles.AllowWhiteSpaces; | |
string s = "Sun, 06 Nov 1994 08:49:37 GMT"; | |
DateTimeOffset value; | |
bool b = DateTimeOffset.TryParseExact (s, "r", DateTimeFormatInfo.InvariantInfo, DefaultStyles, out value); | |
Console.WriteLine (b); | |
return; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment