|
|
Line 1: |
Line 1: |
| This article describes the class ''I2CE_Date''.
| | #REDIRECT [[Class: I2CE_Date (4.0.3)]] |
| *Location: Part of the module [[I2CE Module List#I2CE|I2CE]] in the package [https://launchpad.net/i2ce I2CE]
| |
| *Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L33 lib/I2CE_Date.php] on line 33
| |
| *Author: Luke Duncan <lduncan@intrahealth.org>
| |
| *Since: v1.0.0
| |
| Handles date manipulation. I2CE_Dates are used to manage date and time values for form/HTML display and for interacting with the database.
| |
| ==Constants==
| |
| ===I2CE_Date::YEAR_ONLY===
| |
| Constant value to signify a date only including the year.
| |
| Defined as: 1
| |
| ===I2CE_Date::MONTH_DAY===
| |
| Constant value to signify a date only including the month and day of the month.
| |
| Defined as: 2
| |
| ===I2CE_Date::DATE===
| |
| Constant value to signify a date only including the date.
| |
| Defined as: 3
| |
| ===I2CE_Date::DATE_TIME===
| |
| Constant value to signify a date only including the date and time.
| |
| Defined as: 4
| |
| ===I2CE_Date::TIME_ONLY===
| |
| Constant value to signify a date only including the time.
| |
| Defined as: 5
| |
| ==Variables==
| |
| ===$second===
| |
| The second value for the time.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L38 i2ce/lib/I2CE_Date.php] on line 38
| |
| *Type: private integer $second
| |
| | |
| ===$minute===
| |
| The minute value for the time.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L42 i2ce/lib/I2CE_Date.php] on line 42
| |
| *Type: private integer $minute
| |
| | |
| ===$hour===
| |
| The hour value for the time.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L46 i2ce/lib/I2CE_Date.php] on line 46
| |
| *Type: private integer $hour
| |
| | |
| ===$day===
| |
| The day value for the date.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L50 i2ce/lib/I2CE_Date.php] on line 50
| |
| *Type: private integer $day
| |
| | |
| ===$month===
| |
| The month value for the date.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L54 i2ce/lib/I2CE_Date.php] on line 54
| |
| *Type: private integer $month
| |
| | |
| ===$year===
| |
| The year value for the date.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L58 i2ce/lib/I2CE_Date.php] on line 58
| |
| *Type: private integer $year
| |
| | |
| ===$type===
| |
| The type of I2CE_Date object based on the constant values. Possible date types are YEAR_ONLY Year, MONTH_DAY Month and Day, DATE Date, DATE_TIME Date and Time, and TIME_ONLY Time.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L66 i2ce/lib/I2CE_Date.php] on line 66
| |
| *Type: private integer $type
| |
| | |
| ===$months===
| |
| Array of month names. This should be modified to handle internationalization. The array of month names.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L95 i2ce/lib/I2CE_Date.php] on line 95
| |
| *Type: static public [http://www.php.net/manual/en/language.types.array.php array ] $months
| |
| | |
| ===$types===
| |
| A list of all valid types for I2CE_Date objects.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L102 i2ce/lib/I2CE_Date.php] on line 102
| |
| *Type: static private [http://www.php.net/manual/en/language.types.array.php array ] $types
| |
| | |
| ==Methods==
| |
| ===__construct()===
| |
| Constructor method to create a new I2CE_Date object.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L109 i2ce/lib/I2CE_Date.php] on line 109
| |
| *Signature: private function __construct($type)
| |
| *Parameters:
| |
| ** integer $type <br/>The type of date object created. It defaults to date and time.
| |
| ***Default Value: self::DATE_TIME
| |
| ===addMonthDayElement()===
| |
| Add a selection drop down for the month and date to be selected.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L820 i2ce/lib/I2CE_Date.php] on line 820
| |
| *Signature: static public function addMonthDayElement($template,$name,$default,$showError,$node,$hidden,$blank)
| |
| *Parameters:
| |
| **$template
| |
| ** [http://www.php.net/manual/en/language.types.string.php string ] $name <br/>The name of the selection element
| |
| ** [[Class: I2CE_Date | I2CE_Date]] $default <br/>The default I2CE_Date object to use to preset the value.
| |
| ** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $showError <br/>A flag if this field is currently invalid to mark it as such.
| |
| ** [http://www.php.net/manual/en/class.domnode.php DOMNode ] $node <br/>The node to append the element to.
| |
| ** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $hidden <br/>Set to true if the form element should be hidden. Defaults to false
| |
| ***Default Value: false
| |
| ** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $blank <br/>Set to true if this element should have a blank entry option. Defaults to false.
| |
| ***Default Value: false
| |
| ===addTimeElement()===
| |
| Add a selection drop down for the hour, minute and second to be selected.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L863 i2ce/lib/I2CE_Date.php] on line 863
| |
| *Signature: static public function addTimeElement($template,$name,$default,$showError,$node,$hidden)
| |
| *Parameters:
| |
| **$template
| |
| ** [http://www.php.net/manual/en/language.types.string.php string ] $name <br/>The name of the selection element
| |
| ** [[Class: I2CE_Date | I2CE_Date]] $default <br/>The default I2CE_Date object to use to preset the value.
| |
| ** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $showError <br/>A flag if this field is currently invalid to mark it as such.
| |
| ** [http://www.php.net/manual/en/class.domnode.php DOMNode ] $node <br/>The node to append the element to.
| |
| ** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $hidden <br/>Set to true if the form element should be hidden.
| |
| ***Default Value: false
| |
| ===addYearElement()===
| |
| Add a selection drop down for the year to be selected.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L789 i2ce/lib/I2CE_Date.php] on line 789
| |
| *Signature: static public function addYearElement($template,$name,$default,$showError,$node,$year_range,$hidden,$blank)
| |
| *Parameters:
| |
| **$template
| |
| ** [http://www.php.net/manual/en/language.types.string.php string ] $name <br/>The name of the selection element
| |
| ** [[Class: I2CE_Date | I2CE_Date]] $default <br/>The default I2CE_Date object to use to preset the value.
| |
| ** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $showError <br/>A flag if this field is currently invalid to mark it as such.
| |
| ** [http://www.php.net/manual/en/class.domnode.php DOMNode ] $node <br/>The node to append the element to.
| |
| ** [http://www.php.net/manual/en/language.types.array.php array ] $year_range <br/>The range of years to use for the drop down.
| |
| ** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $hidden <br/>Set to true if the form element should be hidden. Defaults to false.
| |
| ***Default Value: false
| |
| ** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $blank <br/>Set to true if this element should have a blank entry option. Defaults to false.
| |
| ***Default Value: false
| |
| ===before()===
| |
| Determines if a date is before the given date.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L662 i2ce/lib/I2CE_Date.php] on line 662
| |
| *Signature: public function before($date)
| |
| *Parameters:
| |
| ** [[Class: I2CE_Date | I2CE_Date]] $date
| |
| *Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
| |
| ===blank()===
| |
| Create a blank date object with no values set for anything.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L312 i2ce/lib/I2CE_Date.php] on line 312
| |
| *Signature: static public function blank($type)
| |
| *Parameters:
| |
| ** integer $type <br/>The type of date object created. It defaults to date and time.
| |
| ***Default Value: self::DATE_TIME
| |
| *Returns: [[Class: I2CE_Date | I2CE_Date]]
| |
| ===compare()===
| |
| Compares a date to this one and returns -1 if it is before, 0 if the same and 1 if after this date.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L684 i2ce/lib/I2CE_Date.php] on line 684
| |
| *Signature: public function compare($date)
| |
| *Parameters:
| |
| ** [[Class: I2CE_Date | I2CE_Date]] $date
| |
| *Returns: integer
| |
| ===day()===
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L506 i2ce/lib/I2CE_Date.php] on line 506
| |
| *Signature: public function day()
| |
| *Returns: integer<br/>The day part of the date.
| |
| ===dbFormat()===
| |
| Formats the date to be saved to MySQL Formats the date object to a string that MySQL will recognize based on the date type.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L547 i2ce/lib/I2CE_Date.php] on line 547
| |
| *Signature: public function dbFormat()
| |
| *Returns: [http://www.php.net/manual/en/language.types.string.php string ]
| |
| ===displayDate()===
| |
| Displays the date in a readable format.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L569 i2ce/lib/I2CE_Date.php] on line 569
| |
| *Signature: public function displayDate()
| |
| ===equals()===
| |
| Determines if one date is identical to another.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L672 i2ce/lib/I2CE_Date.php] on line 672
| |
| *Signature: public function equals($date)
| |
| *Parameters:
| |
| ** [[Class: I2CE_Date | I2CE_Date]] $date
| |
| *Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
| |
| ===fromDB()===
| |
| Creates a date from a MySQL database formatted string The type of this date object is determined by the string. The possible types are Month/Day ('0000-MM-DD'), Year Only ('YYYY-00-00'), Date ('YYYY-MM-DD'), Date/Time ('YYYY-MM-DD HH:MM:SS'), and Time Only ('HH:MM:SS'). If the string is blank a blank () blank date is returned. If none of thse formats match the now () current date is returned.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L414 i2ce/lib/I2CE_Date.php] on line 414
| |
| *Signature: static public function fromDB($dateString,$type)
| |
| *Parameters:
| |
| ** [http://www.php.net/manual/en/language.types.string.php string ] $dateString <br/>Date formatted string from MySQL
| |
| ** [http://www.php.net/manual/en/language.types.integer.php int ] $type <br/>Defaults to null in which the type is guessed from the {$dateString}. Otherwise it is one of I2CE_DATE::DATE, I2CE_DATE::YEAR_ONLY, etc.
| |
| ***Default Value: null
| |
| *Returns: [[Class: I2CE_Date | I2CE_Date]]
| |
| ===getDate()===
| |
| Creates a date object of the type Date.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L359 i2ce/lib/I2CE_Date.php] on line 359
| |
| *Signature: static public function getDate($day,$month,$year)
| |
| *Parameters:
| |
| ** integer $day <br/>Sets the day of the month to be used
| |
| ***Default Value: -1
| |
| ** integer $month <br/>Sets the month to be used
| |
| ***Default Value: -1
| |
| ** integer $year <br/>Sets the year to be used.
| |
| ***Default Value: -1
| |
| *Returns: [[Class: I2CE_Date | I2CE_Date]]
| |
| ===getDateTime()===
| |
| Creates a date object of the type Date/Time.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L376 i2ce/lib/I2CE_Date.php] on line 376
| |
| *Signature: static public function getDateTime($sec,$min,$hour,$day,$month,$year)
| |
| *Parameters:
| |
| ** integer $sec <br/>Sets the seconds to be used
| |
| ***Default Value: -1
| |
| ** integer $min <br/>Sets the minutes to be used
| |
| ***Default Value: -1
| |
| ** integer $hour <br/>Sets the hour to be used.
| |
| ***Default Value: -1
| |
| ** integer $day <br/>Sets the day of the month to be used
| |
| ***Default Value: -1
| |
| ** integer $month <br/>Sets the month to be used
| |
| ***Default Value: -1
| |
| ** integer $year <br/>Sets the year to be used.
| |
| ***Default Value: -1
| |
| *Returns: [[Class: I2CE_Date | I2CE_Date]]
| |
| ===getDay()===
| |
| Create a date object of the type Month/Day
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L346 i2ce/lib/I2CE_Date.php] on line 346
| |
| *Signature: static public function getDay($day,$month)
| |
| *Parameters:
| |
| ** integer $day <br/>Sets the day of the month to be used
| |
| ***Default Value: -1
| |
| ** integer $month <br/>Sets the month to be used
| |
| ***Default Value: -1
| |
| *Returns: [[Class: I2CE_Date | I2CE_Date]]
| |
| ===getMonthName()===
| |
| The month name text to be displayed for the given month number.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L525 i2ce/lib/I2CE_Date.php] on line 525
| |
| *Signature: public function getMonthName($mon)
| |
| *Parameters:
| |
| ** integer $mon
| |
| *Returns: [http://www.php.net/manual/en/language.types.string.php string ]
| |
| ===getTime()===
| |
| Creates a date object of the type Time.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L393 i2ce/lib/I2CE_Date.php] on line 393
| |
| *Signature: static public function getTime($sec,$min,$hour)
| |
| *Parameters:
| |
| ** integer $sec <br/>Sets the seconds to be used
| |
| ***Default Value: -1
| |
| ** integer $min <br/>Sets the minutes to be used
| |
| ***Default Value: -1
| |
| ** integer $hour <br/>Sets the hour to be used.
| |
| ***Default Value: -1
| |
| *Returns: [[Class: I2CE_Date | I2CE_Date]]
| |
| ===getType()===
| |
| get the type for this Date.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L130 i2ce/lib/I2CE_Date.php] on line 130
| |
| *Signature: public function getType()
| |
| *Returns: integer<br/>$type The type of date object created.
| |
| ===getValues()===
| |
| Get the array of values associated to this date.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L289 i2ce/lib/I2CE_Date.php] on line 289
| |
| *Signature: public function getValues()
| |
| *Returns: [http://www.php.net/manual/en/language.types.array.php array ]<br/>The keys of which match the names for generated html elements
| |
| ===getYear()===
| |
| Create a date object of the type Year only.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L335 i2ce/lib/I2CE_Date.php] on line 335
| |
| *Signature: static public function getYear($year)
| |
| *Parameters:
| |
| ** integer $year <br/>Sets the year to be used.
| |
| ***Default Value: -1
| |
| *Returns: [[Class: I2CE_Date | I2CE_Date]]
| |
| ===hour()===
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L510 i2ce/lib/I2CE_Date.php] on line 510
| |
| *Signature: public function hour()
| |
| *Returns: integer<br/>The hour part of the time.
| |
| ===isDay()===
| |
| Checks to see if the date's day matches the given day.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L621 i2ce/lib/I2CE_Date.php] on line 621
| |
| *Signature: public function isDay($day)
| |
| *Parameters:
| |
| ** integer $day
| |
| *Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
| |
| ===isHour()===
| |
| Checks to see if the date's hour matches the given hour.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L637 i2ce/lib/I2CE_Date.php] on line 637
| |
| *Signature: public function isHour($hour)
| |
| *Parameters:
| |
| ** integer $hour
| |
| *Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
| |
| ===isMinute()===
| |
| Checks to see if the date's minute matches the given minute.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L645 i2ce/lib/I2CE_Date.php] on line 645
| |
| *Signature: public function isMinute($minute)
| |
| *Parameters:
| |
| ** integer $minute
| |
| *Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
| |
| ===isMonth()===
| |
| Checks to see if the date's month matches the given month.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L613 i2ce/lib/I2CE_Date.php] on line 613
| |
| *Signature: public function isMonth($month)
| |
| *Parameters:
| |
| ** integer $month
| |
| *Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
| |
| ===isSecond()===
| |
| Checks to see if the date's second matches the given second.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L653 i2ce/lib/I2CE_Date.php] on line 653
| |
| *Signature: public function isSecond($second)
| |
| *Parameters:
| |
| ** integer $second
| |
| *Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
| |
| ===isValid()===
| |
| Checks to see if the I2CE_Date object is valid This method will check to see if the date object has valid entries based on the type.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L476 i2ce/lib/I2CE_Date.php] on line 476
| |
| *Signature: public function isValid()
| |
| *Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
| |
| ===isYear()===
| |
| Checks to see if the date's year matches the given year.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L629 i2ce/lib/I2CE_Date.php] on line 629
| |
| *Signature: public function isYear($year)
| |
| *Parameters:
| |
| ** integer $year
| |
| *Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
| |
| ===listMonths()===
| |
| Adds the month values to a [[Class: I2CE_Template | ]] object.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L751 i2ce/lib/I2CE_Date.php] on line 751
| |
| *Signature: static public function listMonths($template,$selectId)
| |
| *Parameters:
| |
| ** [[Class: I2CE_Template | I2CE_Template]] $template
| |
| ** [http://www.php.net/manual/en/language.types.string.php string ] $selectId <br/>The id of the element in the page to add the selections to.
| |
| ===listYears()===
| |
| Adds a sequence of years to a [[Class: I2CE_Template | ]] object. It takes two optional arguments to limit the years to use. The initial year to start with is 1990 and it will end with the current year.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L767 i2ce/lib/I2CE_Date.php] on line 767
| |
| *Signature: static public function listYears($template,$selectId,$start,$end)
| |
| *Parameters:
| |
| ** [[Class: I2CE_Template | I2CE_Template]] $template
| |
| ** [http://www.php.net/manual/en/language.types.string.php string ] $selectId <br/>The id of the element in the page to add the selections to.
| |
| ** integer $start <br/>The year to start with
| |
| ***Default Value: 1990
| |
| ** integer $end <br/>The year to end with. @see I2CE_Template::setData()
| |
| ***Default Value: 0
| |
| ===minute()===
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L514 i2ce/lib/I2CE_Date.php] on line 514
| |
| *Signature: public function minute()
| |
| *Returns: integer<br/>The minute part of the time.
| |
| ===month()===
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L502 i2ce/lib/I2CE_Date.php] on line 502
| |
| *Signature: public function month()
| |
| *Returns: integer<br/>The month part of the date.
| |
| ===now()===
| |
| Create a new I2CE_Date object with the current or given date and/or time.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L143 i2ce/lib/I2CE_Date.php] on line 143
| |
| *Signature: static public function now($type,$time_stamp,$strict)
| |
| *Parameters:
| |
| ** integer $type <br/>The type of date object created. It defaults to date and time.
| |
| ***Default Value: self::DATE_TIME
| |
| ** integer $time_stamp <br/>Defaults to null in which case we use the current time stamp. If it is an array then it should be the same array structture as returned by getdate() or the one returned by I2CE_Date::getValues()
| |
| ***Default Value: null
| |
| ** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $strict <br/>Defaults to false. If true, does not return now. If 'blank', returns the blank date.
| |
| ***Default Value: false
| |
| *Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]<br/>I2CE_Date or false if failure on strict mode
| |
| ===second()===
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L518 i2ce/lib/I2CE_Date.php] on line 518
| |
| *Signature: public function second()
| |
| *Returns: integer<br/>the second part of the time.
| |
| ===setBlank()===
| |
| Set the blank string to be used if this date is empty.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L537 i2ce/lib/I2CE_Date.php] on line 537
| |
| *Signature: public function setBlank($text)
| |
| *Parameters:
| |
| ** [http://www.php.net/manual/en/language.types.string.php string ] $text <br/>The text to use.
| |
| ===setType()===
| |
| Set the type for this Date.
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L122 i2ce/lib/I2CE_Date.php] on line 122
| |
| *Signature: public function setType($type)
| |
| *Parameters:
| |
| ** integer $type <br/>The type of date object created. It defaults to date and time.
| |
| ===year()===
| |
| *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/lib/I2CE_Date.php#L498 i2ce/lib/I2CE_Date.php] on line 498
| |
| *Signature: public function year()
| |
| *Returns: integer<br/>The year part of the date.
| |
| | |
| | |
| [[Category:Class Documentation]]
| |