DelphiBasics
  Home  |  Delphi .net Home  |  System.Globalization NameSpace
 .NET Framework
 Namespace References

 System
 System.Collections
 System.Globalization
 
  Calendar  Class 
  CalendarWeekRule  Enumeration 
  CultureInfo  Class 
  CultureTypes  Enumeration 
  DateTimeFormatInfo  Class 
  DateTimeStyles  Enumeration 
  NumberFormatInfo  Class 
  NumberStyles  Enumeration 
  RegionInfo  Class 
  StringInfo  Class 
  TextElementEnumerator  Class 
  TextInfo  Class 
 System.Drawing - download only
 System.IO

 Articles and Tutorials

 Overview of .NET
 Delphi and .NET
 Winform Applications
 ASP .Net Applications
 php Web Services
 Framework Collections
 Framework String Handling
 Framework Files and Folders


 
 
  System.Globalization.CalendarWeekRule Enumeration
 
 Description
The CalendarWeekRule enumeration is used in Calendar operations to determine exactly what the first week of a particular year is.
 
There are 3 possibilities are :
 
FirstDay The first week starts on the first day of the year
FirstFourDayWeek The first week starts on the first day of the first week with at least 4 days in this year
FirstFullWeek The first week starts on the first day of the first week with 7 days in this year

 
These values are used in conh=junction with the value chosen as the first day of a week. When working with International Cultures (System.Globalization.CultureInfo), each culture has its own DateTimeFormat.FirstDayOfWeek. This can of course be overriden so that you can work with your own chosen first day of the week.
 
See Calendar.GetWeekOfYear for examples of using CalendarWeekRule.
 Values
FirstDay  0  The first week starts on the first day of the year
FirstFullWeek  1  The first week starts on the first FirstDayOfWeek of the year.
FirstFourDayWeek  2  The first week starts on the first day of the year, or the first FirstDayOfWeek where that day is one of the first 4 days of the year.

 Delphi Basics links
 
System.Globalization.Calendar

 Microsoft MSDN links
 
System.Globalization
System.Globalization.calendarweekrule
 
Delphi Programming © Neil Moffatt . All rights reserved.  |  Home Page