Unit Kronos |
Classes |
Functions |
Register - Error messages
Types |
TCal
TCalcDaytypeEvent
TChurchdayIndex
TDateExt
TDay
TDaycodes
TDaytypeDef
TDaytypeID
TFirstLastNumber
TForeignKey
TKron
TLoadDaytypeEvent
TMonth
TMonthExt
TMonthImage
TNameStr
TOcEVent
TSaveDaytypeEvent
TWeek
TWeekDay
TWeekExt
TWeekHolidays
TYear
TYearExt
Constants |
chAdvent1
chAdvent2
chAdvent3
chAdvent4
chAscensionDay
chAshWednesday
chBoxingDay
chChristmasDay
chChristmasEve
chEasterEve
chEasterMonday
chEasterSunday
chGoodFriday
chMaundyThursday
chNewYearDay
chNewYearEve
chPalmSunday
chShroveTuesday
ChurchDayCount
chWhitEve
chWhitMonday
chWhitSunday
coLiteracyDay
coMayDay
CommonDayCount
coUNDay
coWomensDay
UserDayType
Variables |
Functions |
Types |
TCal = array[1..366] of Integer;Internal types
TCalcDaytypeEvent = procedure(Sender : TObject; Daytype : TDaytype; ADateExt : TDateExt; IsCurrentDate : boolean; var Accept : boolean) of objectEvent types
TChurchdayIndex = array[1..ChurchdayCount] of word;General type used to keep track of first and last daynumbers for months and weeks
TDateExt = record
Year : word;
DayOfWeekNumber : word;
DayName : string;
MonthDay : Word;
DayNumber : word;
DaytypeCount : word;
DaytypeID : TDaytypeID;
MonthNumber : word;
WeekNumber : word;
Holiday : boolean;
ChurchDay : Boolean;
Flagday : Boolean;
end;
TDay = recordKeeps the indexes of the churchdays in the daycodes array} {The following structures are used to hold extracts from the internal calendar and code table
Daynum : Word;
MonthDate : word;
DOWNum : word;
Month : word;
Week : word;
DayCode : Word;
end;
TDaycodes = array[1..366,1..2] of word;Internal calendar with dates. Dates are formattted as month * 100 + monthdays number
TDaytypeDef = record
AName : TNameStr;
ADate : word;
ARelDayType : word;
AnOffset : integer;
AFirstShowUp : word;
ALastShowUp : word;
AShowUpFrequency : word;
AChurchDay : boolean;
AHoliday : boolean;
AFlagday : boolean;
AUserCalc : boolean;
ATag : integer;
end;
TDaytypeID = array[1..255] of word;TKronos types:
TFirstLastNumber = array[1..2] of Word;Daycodes for churchdays (2) and internal dow-numbers (1) dow-numbers are 1 for monday, 2 for tuesday, etc. The churchdays codes corresponds to the churchday constants
TForeignKey = record
KeyName : string;
KeyValue : Variant;
end;
TKron = record
ActiveYear : Word;
IsInitialized : boolean;
end;
TLoadDaytypeEvent = procedure(Sender : TObject; const DaytypeDef : TDaytypeDef; const DescKeys: String; ClassId : Integer; var LoadIt : boolean) of object
TMonth = record
Month : word;
Daycount : Word;
WeekCount : Word;
WhichWeeks : TFirstLastNumber;
WhichDays : TFirstLastNumber;
end;
TMonthExt = recordIndex 0 in second dimention contains weeknumbers, else daynumbers
Year : word;
MonthNumber : word;
MonthName : string;
FirstDay : word;
LastDay : word;
NumDays : word;
NumWeeks : word;
FirstWeek : word;
LastWeek : word;
MonthImage : TMonthImage;
end;
TMonthImage = array[1..6, 0..7] of smallint;
TNameStr = string[50]
TOcEVent = (ocYear, ocMonth, ocMonthnumber, ocWeek, ocWeeknumber, ocMonthDay, ocWeekday, ocDate, ocToday, ocCalcDaytype);To adjust the Kronos component to countryspesific settings the user can choose between to strategies: 1: In the Form's constructor either load a calendar profile from file (LoadFromFile) or call the methods : * AddDaytype to define country spesific daytypes * SpecifyStandardDay to name the std church and common daytypes and set their status * SetFirstWeekday to set the day that starts the week. * UpdateInfo to aussure that the current info is properly updated 2: Derive a new componet based on Kronos and override the method SetCountrySpecifics. Here the user should call the above mentioned methods except UpdateInfo.} // Event classification type. Use to iterate over the event buffer
TSaveDaytypeEvent = procedure(Sender : TObject; Daytype : TDaytype; var DescKeys : String; var ClassID : Integer; var SaveIt : boolean) of object
TWeek = record
WeekNum : word;
WhichDays : TFirstLastNumber;
end;
TWeekDay = (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday);
TWeekExt = record
Year : word;
WeekNumber : word;
FirstDay : word;
LastDay : word;
end;
TWeekHolidays = set of TWeekDay
TYear = record
WeekCount : word;
DayCount : Word;
end;
TYearExt = record
Year : word;
NumDays : word;
NumWeeks : word;
LeapYear : boolean;
YeartypeCount : word;
end;
Constants |
Variables |