DateTimeStyles.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT license.
  3. // See the LICENSE file in the project root for more information.
  4. /*============================================================
  5. **
  6. **
  7. **
  8. ** Purpose: Contains valid formats for DateTime recognized by
  9. ** the DateTime class' parsing code.
  10. **
  11. **
  12. ===========================================================*/
  13. namespace System.Globalization
  14. {
  15. [Flags]
  16. public enum DateTimeStyles
  17. {
  18. // Bit flag indicating that leading whitespace is allowed. Character values
  19. // 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, and 0x0020 are considered to be
  20. // whitespace.
  21. None = 0x00000000,
  22. AllowLeadingWhite = 0x00000001,
  23. AllowTrailingWhite = 0x00000002, //Bitflag indicating trailing whitespace is allowed.
  24. AllowInnerWhite = 0x00000004,
  25. AllowWhiteSpaces = AllowLeadingWhite | AllowInnerWhite | AllowTrailingWhite,
  26. // When parsing a date/time string, if all year/month/day are missing, set the default date
  27. // to 0001/1/1, instead of the current year/month/day.
  28. NoCurrentDateDefault = 0x00000008,
  29. // When parsing a date/time string, if a timezone specifier ("GMT","Z","+xxxx", "-xxxx" exists), we will
  30. // adjust the parsed time based to GMT.
  31. AdjustToUniversal = 0x00000010,
  32. AssumeLocal = 0x00000020,
  33. AssumeUniversal = 0x00000040,
  34. // Attempt to preserve whether the input is unspecified, local or UTC
  35. RoundtripKind = 0x00000080,
  36. }
  37. }