Source API for the «PorteTypes_Date» class
Type class to interact with the "timestamp", "date", "datetime", "time" and "year" properties.
Public static methods
- sanitize
-
This method is not yet documented.
- get
-
Return the value of a record property as an sql date.
Options may include:
- seconds return the date in seconds (Unix timestamp)
- milliseconds return the date in milliseconds (Unix timestamp)
-
- return
- mixed
- String if date or int if seconds/milliseconds
- string
- $property, Property
- name from where to retrieve the value
- PorteRecord
- $record, Record
- owning the property
- array[optional]
- $options, Optional
- array
- getAsSeconds
-
Return the value of a record property as a timestamp in second.
-
- return
- PorteRecord
- Provided record
- Property
- $property, to
- set
- PorteRecord
- $record, Record
- on which to set the property
- set
-
Set a value which will be casted as a date type. It handles the following types:
- timestamp
- date
- datetime
- time
- year
-
- return
- PorteRecord
- Provided record
- Property
- $property, to
- set
- PorteRecord
- $record, Record
- on which to set the property
- mixed
- $value, Value
- to set
- fromArray
-
This method is not yet documented.
- toArray
-
This method is not yet documented.
- tableUpdate
-
This method is not yet documented.