The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::Dochazka::REST::Util::Timestamp - date/time-related utilities

SYNOPSIS

Date/time-related utilities

    use App::Dochazka::REST::Util::Timestamp;

    ...

EXPORTS

This module provides the following exports:

split_tsrange (function)
subtract_days (function)
tsrange_equal (function)

FUNCTIONS

split_tsrange

Given 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 ))

subtract_days

Given a timestamp and an integer n, subtract n days.

tsrange_equal

Given two strings that might be equal tsranges, consult the database and return the result (true or false).

AUTHOR

Nathan Cutler, <presnypreklad@gmail.com>