Recommend this page to a friend! |
Download .zip |
Info | Example | View files (7) | Download .zip | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 20 | All time: 10,224 This week: 286 |
Version | License | PHP version | Categories | |||
stateinfo 1.0.0 | Freely Distributable | 5 | XML, PHP 5, Time and Date, Geography |
Description | Author | |
This class can be used to get the holiday dates of specific countries. |
This class provides some information for federal states of - germany - austria - switzerland ('federal states' -> 'cantons') and the public holidays applicable to the individual federal states. For moving public holidays (not on a fixed date, e.g. Easter), a calculation of the date for any calendar year is included. Since there are sometimes several number ranges per state, the main issue of this class is the relationship between the postcode and the state to which the respective place belongs. This information is often required to determine state-specific regulations (e.g. public holidays, school holidays, laws ...) The class provides a list of all federal states and the corresponding abbreviation. Conversely, a corresponding SQL WHERE condition can be created in order to find all addresses in a database in a particular state. (usually the address data do not contain the correct state information) Since this information normally do not change, an XML file was chosen for data storage, which allows easily access with XPath. 1.Notes to the reverse search of federal state from postcode ------------------------------------------------------------ Since the backward search is based on areas from-to, it does not necessarily mean that the postcode that is being searched for actually exists - the validation of a postcode should be carried out via a database or an appropriate (web) service. Due to the fact that some postcodes in Austria and Switzerland include a cross-federal state area, it is possible that in this case a comma-separated list of the affected federal states (or abbreviations) will be returned as a result. 2. Notes about public holidays ------------------------------------------------------------- 2.a Germany In Germany there are a few public holidays that are only partially valid within a federal state - here you should then query directly via the postcode. 2.b Austria / Switzerland In the case, that a given postcode belongs to multiple states it does not make sense to query the valid public holidays using the postcode, since no clear state can be assigned. |
Files |
File | Role | Description | ||
---|---|---|---|---|
lib (2 directories) | ||||
readme.txt | Doc. | readme | ||
StatesInfoTestAT.php | Example | Testscript for Austria | ||
StatesInfoTestCH.php | Example | Testscript for Switzerland | ||
StatesInfoTestDE.php | Example | Testscript for Germany |
Files | / | lib | / | Helper |
File | Role | Description |
---|---|---|
ExtDOMDocument.php | Aux. | Helper class for easier XML access |
Files | / | lib | / | StatesInfo |
File | Role | Description |
---|---|---|
StatesInfo.php | Class | class to get infos for federal states |
StatesInfoData.xml | Data | XML-Data file |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.