App::Dochazka::REST::Util::Timestamp - date/time-related utilities
Version 0.115
Date/time-related utilities
use App::Dochazka::REST::Util::Timestamp; ...
This module provides the following exports:
$today
$today_ts
$yesterday
$yesterday_ts
$tomorrow
$tomorrow_ts
Given a database handle and a string that might be a tsrange, split it into its lower and upper bounds (i.e. into two timestamps) by running it through the SQL statement:
SELECT lower(CAST( ? AS tsrange )), upper(CAST( ? AS tsrange ))
Given a database handle and a string that might be a timestamp, "canonicalize" it by running it through the database in the SQL statement:
SELECT CAST( ? AS TIMESTAMP )
Given a timestamp and an integer n, subtract n days.
Given a database handle and two strings that might be equal tsranges, consult the database and return the result (true or false).
Nathan Cutler, <presnypreklad@gmail.com>
<presnypreklad@gmail.com>
To install App::Dochazka::REST, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Dochazka::REST
CPAN shell
perl -MCPAN -e shell install App::Dochazka::REST
For more information on module installation, please visit the detailed CPAN module installation guide.