% include( '/elements/header.html', 'Developer Documentation' ) %> <& /elements/menubar.html, 'Freeside Perl Modules' => $fsurl.'docs/library/FS.html', 'Complete Index' => $fsurl.'docs/library/index.html', &>
FS::rate_time_interval - Object methods for rate_time_interval records
use FS::rate_time_interval;
$record = new FS::rate_time_interval \%hash;
$record = new FS::rate_time_interval { 'column' => 'value' };
$error = $record->insert;
$error = $new_record->replace($old_record);
$error = $record->delete;
$error = $record->check;
An FS::rate_time_interval object represents an interval of clock time during the week, such as "Monday, 7 AM to 8 PM". FS::rate_time_interval inherits from FS::Record. The following fields are currently supported:
primary key
Start of the interval, in seconds from midnight on Sunday.
End of the interval.
A foreign key to an FS::rate_time object representing the set of intervals to which this belongs.
Creates a new example. To add the example to the database, see "insert".
Note that this stores the hash reference, not a distinct copy of the hash it points to. You can ask the object for a copy with the hash method.
Adds this record to the database. If there is an error, returns the error, otherwise returns false.
Delete this record from the database.
Replaces the OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.
Checks all fields to make sure this is a valid interval. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
Returns the FS::rate_time comprising this interval.
Returns two strings containing stime and etime, formatted "Day HH:MM AM/PM". Example: "Mon 5:00 AM". Seconds are not displayed, so be careful.
FS::rate_time, FS::Record, schema.html from the base documentation.