IRISLIB database
Hijri Class Reference

A Calendar.Hijri object contains a sequence of monthly lunar observations that can be installed into an InterSystems IRIS process so that the $ZDATE[TIME]H and $ZDATE[TIME]H functions use those observations when computing Hijri dates. More...

Inheritance diagram for Hijri:
Collaboration diagram for Hijri:

Public Member Functions

_.Library.Status AddObservation (_.Library.Integer Month, _.Library.Integer Year, _.Library.Integer Observation)
 The method AddObservation will modify a lunar observation in the last year. More...
 
_.Library.Status InstallCalendar ()
 The Method InstallCalendar installs the Observed Calendar. More...
 
- Public Member Functions inherited from Persistent
_.Library.Status AcquireLock (_.Library.String locktype)
 Acquires a lock for the current instance. More...
 
_.Library.Status LoadData (_.Library.String id)
 LoadData() - loads an object from storage. More...
 
_.Library.Status OnAfterSave (_.Library.Boolean insert)
 This callback method is invoked by the <METHOD>Save</METHOD> method to. More...
 
_.Library.Status OnBeforeSave (_.Library.Boolean insert)
 This callback method is invoked by the <METHOD>Save</METHOD> method to. More...
 
_.Library.Status OnOpen ()
 This callback method is invoked by the <METHOD>Open</METHOD> method to. More...
 
_.Library.Status OnReload ()
 This callback method is invoked by the <METHOD>Reload</METHOD> method to. More...
 
_.Library.Status OnRollBack ()
 This callback method is invoked by the <METHOD>Save</METHOD> method to. More...
 
_.Library.Status ReleaseLock (_.Library.String locktype)
 Releases a lock for the current instance. More...
 
_.Library.Status SaveData (_.Library.String id)
 SaveData() - saves an object to disk, checks uniqueness and referential More...
 
- Public Member Functions inherited from SwizzleObject
_.Library.Status OnJournalObject (_.Library.Integer tranid, _.Library.Integer jrnid, _.Library.String filter)
 This callback method is invoked by the <METHOD>JournalObject</METHOD> method to. More...
 
- Public Member Functions inherited from RegisteredObject
_.Library.Status OnAddToSaveSet (_.Library.Integer depth, _.Library.Integer insert, _.Library.Integer callcount)
 This callback method is invoked when the current object is added to the SaveSet,. More...
 
_.Library.Status OnClose ()
 This callback method is invoked by the <METHOD>Close</METHOD> method to. More...
 
_.Library.Status OnConstructClone (_.Library.RegisteredObject object, _.Library.Boolean deep, _.Library.String cloned)
 This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to. More...
 
_.Library.Status OnNew ()
 This callback method is invoked by the <METHOD>New</METHOD> method to. More...
 
_.Library.Status OnValidateObject ()
 This callback method is invoked by the <METHOD>ValidateObject</METHOD> method to. More...
 
- Public Member Functions inherited from Adaptor
_.Library.Status XMLExport (_.Library.String top, _.Library.String format, _.XML.Namespaces namespaces, attrs, _.Library.String createId, _.Library.String typeAttr, oreflist, idlist, _.Library.String initialIndent, _.Library.Boolean local, _.Net.MIMEPart mimeAttachments)
 Serialize an XML enabled class as an XML document and write. More...
 
_.Library.Status XMLExportToStream (_.Stream.Object export, _.Library.String top, _.Library.String format, _.XML.Namespaces namespaces, attrs, _.Library.String createId, _.Library.String typeAttr, oreflist, idlist, _.Library.String initialIndent)
 Serialize an XML enabled class as an XML document and appends it to a stream. More...
 
_.Library.Status XMLExportToString (_.Library.String export, _.Library.String top, _.Library.String format, _.XML.Namespaces namespaces, attrs, _.Library.String createId, _.Library.String typeAttr, oreflist, idlist, _.Library.String initialIndent)
 Serialize an XML enabled class as an XML document and write it to a string. More...
 

Static Public Member Functions

_.Library.Boolean IsLeap (_.Library.Integer Year)
 The IsLeap(Year) Class Method returns 1 if Year is a Tabular. More...
 
 RemoveCalendar ()
 The RemoveCalendar() Class Method removes any lunar observations. More...
 
- Static Public Member Functions inherited from Persistent
_.Library.Status DeleteData (_.Library.String id, _.Library.Integer concurrency)
 This method is normally generated by the storage class for persistent classes using. More...
 
_.Library.Status KillExtentData (_.Library.Boolean killstreams)
 KillExtentData() - kills extent data in storage. More...
 
_.Library.Status OnAfterBuildIndices (_.Library.String indexlist)
 This callback method is invoked by the <METHOD>BuildIndices</METHOD> method after all work is completed. More...
 
_.Library.Status OnAfterDelete (_.Library.ObjectIdentity oid)
 This callback method is invoked by the <METHOD>Delete</METHOD> method to. More...
 
_.Library.Status OnAfterPurgeIndices (_.Library.String indexlist)
 This callback method is invoked by the <METHOD>PurgeIndices</METHOD> method after all work is completed. More...
 
_.Library.Status OnBeforeBuildIndices (_.Library.String indexlist)
 
_.Library.Status OnBeforePurgeIndices (_.Library.String indexlist)
 
_.Library.Status OnDelete (_.Library.ObjectIdentity oid)
 This callback method is invoked by the <METHOD>Delete</METHOD> method to. More...
 
- Static Public Member Functions inherited from Adaptor
_.Library.Status XMLDTD (_.Library.String top, _.Library.String format, _.Library.Boolean input, dtdlist)
 Write the DTD to the current device for this XML enabled class serialized as. More...
 
_.Library.RegisteredObject XMLNew (_.XML.Document document, _.Library.Integer node, _.Library.RegisteredObject containerOref)
 Get an instance of an XML enabled class. More...
 
_.Library.Status XMLSchema (_.Library.String top, _.Library.String format, _.Library.String namespacePrefix, _.Library.Boolean input, _.Library.Boolean refOnly, schema)
 Write an XML Schema fragment to the current device which describes an XML enabled class and dependent classes. More...
 
_.Library.String XMLSchemaNamespace ()
 Get the namespace to which this class belongs for use in schema generation. More...
 
_.Library.Status XMLSchemaType (_.XML.Schema schemaInstance, _.XML.Node node, _.Library.String top, _.Library.Boolean encoded, _.Library.Boolean summary, _.Library.Boolean input, _.Library.Boolean refOnly)
 Add a complexType to the schema that is respresented by an <class>XML.Schema</class> instance. More...
 

Public Attributes

 BeginDateH
 Property BeginDateH is the $HOROLOG format date corresponding. More...
 
 BeginYear
 Property BeginYear is the AH year containing the first observation. More...
 
 CalendarName
 Property CalendarName contains the unique name of the. More...
 
 Delta
 Delta is a string of characters indicating the difference. More...
 
 EndYear
 Property EndYear is the AH year following the year with. More...
 
 Months
 Property Months is a string of "1"s and "0"s where each. More...
 

Static Public Attributes

 EarlyDate = None
 Parameter EarlyDate is smallest (most negative) DateH value than. More...
 
 MaxYear = None
 Parameter MaxYear specifies the maximum number of Hijri years. More...
 
- Static Public Attributes inherited from Persistent
 XCOMPACTANCESTRY
 XCOMPACTANCESTRY can be set to a string to replace the value of the %CLASSNAME property (x__classname field) More...
 
 DATALOCATIONGLOBAL = None
 Global name containing master map data for this class. More...
 
 DEFAULTGLOBAL = None
 
 DSCONDITION = None
 DSCONDITION is the expression that will be evaluated before deciding whether certain actions must be taken. More...
 
 DSINTERVAL = None
 DSINTERVAL is the number of seconds between one DSTIME value and the next. More...
 
 DSTIME = None
 If the DSTIME parameter is set to AUTO then the most recent filing operation in the current DSTIME value. More...
 
 EXTENTQUERYSPEC = None
 The EXTENTQUERYSPEC parameter defines the properties to be retrieved in. More...
 
 EXTENTSIZE = None
 The EXTENTSIZE parameter is used to inform the SQL Query Optimizer More...
 
 GUIDENABLED = None
 If this parameter is set to 1 then a GUID will be assigned (to the GUID property) to each new object. More...
 
 IDENTIFIEDBY = None
 The IDENTIFIEDBY parameter can optionally be set to the name. More...
 
 MANAGEDEXTENT = None
 The MANAGEDEXTENT parameter can be set to 0 (zero) to cause the Extent Manager. More...
 
 READONLY = None
 READONLY = 1 means that objects can be created, opened but not saved or deleted. More...
 
 ROWLEVELSECURITY = None
 ROWLEVELSECURITY = 1 | <property> means that row level security is active and the list More...
 
 SQLPREVENTFULLSCAN = None
 SQLPREVENTFULLSCAN = 1 means an attempt to prepare a query that will result in a full scan More...
 
 STORAGEDEFAULT = None
 STORAGEDEFAULT defines the default storage allocation to use for properties in this class. More...
 
 USEEXTENTSET = None
 
 VERSIONCLIENTNAME = None
 VERSIONCLIENTNAME can be set to a valid CLIENTNAME (see property CLIENTNAME) value. More...
 
 VERSIONPROPERTY = None
 VERSIONPROPERTY = <property> means that the <property> in memory will be compared to. More...
 
- Static Public Attributes inherited from SwizzleObject
 DEFAULTCONCURRENCY = None
 DEFAULTCONCURRENCY is the default value for the concurrency formal argument. More...
 
 JOURNALSTREAM = None
 If OBJJOURNAL is true then the value of the JOURNALSTREAM parameter defines whether or not. More...
 
 OBJJOURNAL = None
 if OBJJOURNAL is TRUE then inserts, updates and deletes will be logged in ^OBJ.JournalT More...
 
- Static Public Attributes inherited from RegisteredObject
 CAPTION = None
 Optional name used by the Form Wizard for a class when generating forms. More...
 
 JAVATYPE = None
 The Java type to be used when exported.
 
 PROPERTYVALIDATION = None
 This parameter controls the default validation behavior for the object. More...
 
- Static Public Attributes inherited from Adaptor
 ATTRIBUTEQUALIFIED = None
 ATTRIBUTEQUALIFIED controls the format of exported XML by controlling whether attributes. More...
 
 ELEMENTQUALIFIED = None
 ELEMENTQUALIFIED controls the format of exported XML. More...
 
 NAMESPACE = None
 NAMESPACE specifies the XML namespace to be used when projecting the. More...
 
 SUPPRESSTYPEPREFIX = None
 SUPPRESSTYPEPREFIX allows the type name that refers to this class. More...
 
 XMLDEFAULTREFERENCE = None
 XMLDEFAULTREFERENCE specifies the default value of the XMLREFERENCE property parameter. More...
 
 XMLENABLED = None
 If this parameter is true then XML-enabling methods. More...
 
 XMLFORMAT = None
 The XMLFORMAT parameter controls the generation of the XMLExport and XMLImport. More...
 
 XMLIGNOREINVALIDATTRIBUTE = None
 The XMLIGNOREINVALIDATTRIBUTE parameter allows the programmer to control handling of unexpected. More...
 
 XMLIGNOREINVALIDTAG = None
 The XMLIGNOREINVALIDTAG parameter allows the programmer to control handling of unexpected. More...
 
 XMLIGNORENULL = None
 XMLIGNORENULL allows the programmer to override the default XML handling. More...
 
 XMLINCLUDEINGROUP = None
 XMLINCLUDEINGROUP allows the programmer to control whether a class is included. More...
 
 XMLINHERITANCE = None
 If the XMLINHERITANCE parameter is set to "LEFT", then in the case of multiple. More...
 
 XMLNAME = None
 This parameter provides the default XMLNAME for the class. More...
 
 XMLNIL = None
 The XMLNIL class parameter controls the use of xsi:nil by XMLExport. More...
 
 XMLNILNOOBJECT = None
 The XMLNILNOOBJECT parameter allows creation of an object to be skipped for elements. More...
 
 XMLPREFIX = None
 The XMLPREFIX parameter controls the prefix to be used for the XML namespace that. More...
 
 XMLSEQUENCE = None
 If the XMLSEQUENCE = 1, then the order of the XML elements must match the. More...
 
 XMLSUMMARY = None
 The summary fields to be used when an object is referenced are specified. More...
 
 XMLTYPE = None
 This parameter provides the default XMLTYPE for the class. More...
 
 XMLUNSWIZZLE = None
 If the XMLUNSWIZZLE parameter is set to 1, then single object. More...
 
 XMLUSEEMPTYELEMENT = None
 If the XMLUSEEMPTYELEMENT parameter is set to 1, then the empty element shorthand (<tag>) More...
 

Detailed Description

A Calendar.Hijri object contains a sequence of monthly lunar observations that can be installed into an InterSystems IRIS process so that the $ZDATE[TIME]H and $ZDATE[TIME]H functions use those observations when computing Hijri dates.

Evaluating ##class(Calendar.Hijri).New(Name,Year,DateH,Months) produces a new Hijri Observation Calendar object with the the calendar name specified by the argument Name. The argument Year is the Hijri year number for the year containing the first 12 lunar observations. The argument DateH contains a ObjectScript $HOROLOG date value specifying the first day of the first Hijri year containing observational data. The String Months contains the observations starting from the first month of Hijri year Year. If the length of Months string argument is not a multiple 12 then extra observations will be added to fill out to the end of the last year. These extra months will attempt to bring the last day of the Observed calendar years closer to the Tabular calendar. These supplied months can be changed in the future after the actual observations are available. A character in the string Months must be "0" if there is a lunar observation which ends the corresponding month on the 29th day. The character in the string Months must be "1" if there is no lunar observation on the 29th day of the month and that month instead has 30 days. No characters other than "0" and "1" are permitted in the Months string.

Note the description of the Delta property which keeps track of the difference between the Observational Calendar and the Tabular Calendar. When a Calendar.Hijri is created (by the New method) or is modified (by the AddObservation method), there is a restriction that the the difference between the Observed Calendar dates and the corresponding Tabular Calendar dates cannot be greater than 5 days apart. Such a difference between the Observed Calendar and the Tabular Calendar indicates an error in the observational data that is trying to become part of the Calendar.Hijri object. An attempt to have a difference that is more than 5 days earlier or more than 5 days later means the new object will not be created or that an existing object will not be modified.

Users of the Calendar.Hijri Class are encouraged to suggest improvements to InterSystems that could be added to this Class

Member Function Documentation

◆ AddObservation()

_.Library.Status AddObservation ( _.Library.Integer  Month,
_.Library.Integer  Year,
_.Library.Integer  Observation 
)

The method AddObservation will modify a lunar observation in the last year.

of the Calendar.Hijri object. If necessary, an additional year of observations will be added to the object when the observation is in the year following the last year of observations. The additional year will be constructed to sync the Observed Calendar with the Tabular Calendar before adding the new Observation.

If the new Observation is being made to a month before Month 12 then AddNewObservation method will attempt to modify an observation in a month following the new Observation so that the Observed - Tabular difference at the end of the year is not changed.

You must have installed all the observations for the months of the last year before you use AddObservation to add an observations for a new, additional ending year. After a new year is added to the table of observations, the only way to modify any preceding year to to call ##class(Calendar.Hijri).New(Name,Year,DateH,Months) to in create a new object containing the modified observations. (Hint: If you want to keep the same name as an existing object then you must delete the existing object before creating a new object with the same name.)

Note: AddObservation just modifies the in-process copy of the Calendar. You must use the Save method to save the modification back to your namespace. Also, AddObservation does not "install" your change into the process. You must use the InstallCalendar method to have the $ZDATE[TIME]H or $ZDATE[TIME]H functions start using the new observation.

◆ InstallCalendar()

_.Library.Status InstallCalendar ( )

The Method InstallCalendar installs the Observed Calendar.

contained in the Calendar.Hijri object into the process for use by the $ZDATE[TIME]H functions, where mode is one of 20 or 21.

◆ IsLeap()

_.Library.Boolean IsLeap ( _.Library.Integer  Year)
static

The IsLeap(Year) Class Method returns 1 if Year is a Tabular.

Leap Year; otherwise it returns 0.

◆ RemoveCalendar()

RemoveCalendar ( )
static

The RemoveCalendar() Class Method removes any lunar observations.

installed in the process so the $ZDATE[TIME][H] functions using date formats 20 and 21 default to using the Tabular Hijri Calendar instead of using lunar Observations to control the Hijri Calendar.

Member Data Documentation

◆ EarlyDate

EarlyDate = None
static

Parameter EarlyDate is smallest (most negative) DateH value than.

can be passed to ##class(Calendar.Hijri).New(Name,Year,DateH,Months) when creating a new Calendar.Hijri object. It is 5 days earlier than AH date 1 1 0001 in the Tabular Hijri calendar. Note that the Tabular calendar will not handle DateH values earlier than -445031.

◆ MaxYear

MaxYear = None
static

Parameter MaxYear specifies the maximum number of Hijri years.

containing observations that can be loaded into an InterSystems IRIS process.

◆ BeginDateH

BeginDateH

Property BeginDateH is the $HOROLOG format date corresponding.

to first day of the first year containing lunar observations.  

◆ BeginYear

BeginYear

Property BeginYear is the AH year containing the first observation.

 

◆ CalendarName

CalendarName

Property CalendarName contains the unique name of the.

Calendar.Hijri object. The CalendarName in the ID key used to locate a particular Calendar.Hijri object by evaluating

class(%Calendar.Hijri).OpenId(CalendarName)

 

◆ Delta

Delta

Delta is a string of characters indicating the difference.

between the Observed calendar and the Tabular calendar on the first day of every year. The character "F" indicates a delta of 0; the characters "A"..."E" indicate deltas of -5..-1; and the characters "G"..."K" indicates deltas of +1..+5. The length of the string Delta is EndYear - BeginYear + 1. The first character of Delta indicates the difference between $ZDATE("1 1 "_..BeginYear,21)-$ZDATE("1 1 "_.BeginYear,19) I.e., the difference between the Calendar with lunar observations and the Tabular Calendar on the first year containing observations. On first day of each year, the delta between Observed Calendar minus the Tabluar Calendar must be in the range -5 .. +5. The last character of the string Delta indicates the difference between the Observed Calendar minus the Tabular Calendar on the first day of year ..EndYear.

 

◆ EndYear

EndYear

Property EndYear is the AH year following the year with.

the last string of observations.  

◆ Months

Months

Property Months is a string of "1"s and "0"s where each.

character specifies the lunar observation for the corresponding month. The length of the string Months is (EndYear - BeginYear) * 12.

The character "0" indicates a 29 day month; the character "1" indicates a 30 day month.