The Labs \ Source Viewer \ SSCLI \ System.Globalization \ DateTimeStyles

  1. // ==++==
  2. //
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. //
  14. // ==--==
  15. /*============================================================
  16. **
  17. ** Enum:  DateTimeStyles.cs
  18. **
  19. **
  20. ** Purpose: Contains valid formats for DateTime recognized by
  21. ** the DateTime class' parsing code.
  22. **
  23. **
  24. ===========================================================*/
  25. namespace System.Globalization
  26. {
  27.    
  28.    
  29.     [Flags(), Serializable()]
  30.     [System.Runtime.InteropServices.ComVisible(true)]
  31.     public enum DateTimeStyles
  32.     {
  33.         // Bit flag indicating that leading whitespace is allowed. Character values
  34.         // 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, and 0x0020 are considered to be
  35.         // whitespace.
  36.        
  37.        
  38.         None = 0,
  39.        
  40.         AllowLeadingWhite = 1,
  41.        
  42.         AllowTrailingWhite = 2,
  43.         //Bitflag indicating trailing whitespace is allowed.
  44.         AllowInnerWhite = 4,
  45.        
  46.         AllowWhiteSpaces = AllowLeadingWhite | AllowInnerWhite | AllowTrailingWhite,
  47.         // When parsing a date/time string, if all year/month/day are missing, set the default date
  48.         // to 0001/1/1, instead of the current year/month/day.
  49.        
  50.         NoCurrentDateDefault = 8,
  51.         // When parsing a date/time string, if a timezone specifier ("GMT","Z","+xxxx", "-xxxx" exists), we will
  52.         // ajdust the parsed time based to GMT.
  53.        
  54.         AdjustToUniversal = 16,
  55.        
  56.         AssumeLocal = 32,
  57.        
  58.         AssumeUniversal = 64,
  59.         // Attempt to preserve whether the input is unspecified, local or UTC
  60.         RoundtripKind = 128
  61.     }
  62. }

Developer Fusion