<<css mode="next" class="sidebar"></css>> (((
- '''<a href="/docs/fORMDate">Class Documentation</a>''' - <a href="/api/fORMDate">API Reference</a> - <a href="https://github.com/flourishlib/flourish-classes/blob/master/fORMDate.php" target="_blank">Source Code</a>
<<toc></toc>>
- fActiveRecord - fRecordSet
- fORM - fORMColumn - fORMDatabase - '''fORMDate''' - fORMFile - fORMJSON - fORMMoney - fORMOrdering - fORMRelated - fORMSchema - fORMValidation
)))
The fORMDate class is an ORM plugin to provide additional functionality for date and time columns.
The static method ::configureDateCreatedColumn() sets an active record class to automatically set a `date`, `time` or `timestamp` column to the date/time when the record is first saved in the database.
The static method ::configureDateUpdatedColumn() sets an active record class to automatically set a `date`, `time` or `timestamp` column to the current date/time each time the record is saved in the database.
Since not all supported databases support timezone information in timestamp columns, the fORMDate class allows associating a timestamp column with another column to store the timezone name. The static method ::configureTimezoneColumn() accepts three parameters, the `$class`, the `$timestamp_column` and the `$timezone_column`.
The timezone column will be used to store the timezone stored in any fTimestamp objects that are set to the timestamp column. If a new timestamp is set, it will be combined with the existing timezone into a new fTimestamp object. The object will be stored in the timestamp column. If a new timezone is set, it will be combined with the existing timestamp and the new fTimestamp object will be stored in the timestamp column.