NAME
Brick - This is the description
SYNOPSIS
use Brick;
DESCRIPTION
- _is_YYYYMMDD_date_format
- _is_YYYYMMDD_date_format
-
sub _is_in_the_future { my( $bucket, $setup ) = @_; croak "Not implemented"; }
sub _is_tomorrow { my( $bucket, $setup ) = @_; croak "Not implemented"; }
sub _is_today { my( $bucket, $setup ) = @_; croak "Not implemented"; }
sub _is_yesterday { my( $bucket, $setup ) = @_; croak "Not implemented"; }
sub _is_in_the_past { my( $bucket, $setup ) = @_; croak "Not implemented"; }
- date_within_range
- days_between_dates_within_range( HASHREF )
-
I can specify any of the dates as part of the setup by supplying them as the values for these keys in the setup hash:
start_date end_date input_date
Instead of fixed values, I can tell the function to get values from input fields. Put the field names in the values for these keys of the setup hash"
start_date_field end_date_field input_date_field
I can use any combination of these setup fields, although the start_date, end_date, and input_date take precedence.
TO DO: Need to validate all the date formats before I use them in the comparisons
- days_between_dates_outside_range( HASHREF )
-
I can specify any of the dates as part of the setup by supplying them as the values for these keys in the setup hash:
start_date end_date input_date
Instead of fixed values, I can tell the function to get values from input fields. Put the field names in the values for these keys of the setup hash"
start_date_field end_date_field input_date_field
I can use any combination of these setup fields, although the start_date, end_date, and input_date take precedence.
TO DO: Need to validate all the date formats before I use them in the comparisons
- at_least_N_days_between
- at_most_N_days_between
-
Like
at_least_N_days_between
, but the dates cannot be more than N days apart.At the moment this has the curious result that if the end date in before the start date, the duration between them is negative, so that duration is shorter than any positive number. This isn't a bug but a loack of a design decision if I should require the end date to be after the start date.
sub at_most_N_days_after { my( $bucket, $setup ) = @_;
croak "Not implemented!"; }
sub at_most_N_days_before { my( $bucket, $setup ) = @_;
croak "Not implemented!"; }
sub before_fixed_date { my( $bucket, $setup ) = @_;
croak "Not implemented!"; }
sub after_fixed_date { my( $bucket, $setup ) = @_;
croak "Not implemented!"; }
- __get_ymd_as_hashref( YYYYMMDD );
-
Given two dates in YYYYMMDD format, return the number of days between them, including the last date.
For the dates 20070101 and 20070103, return 2 because it includes the last day.
For the dates 20070101 and 20060101, return -365 because the last date is in the past.
- __get_ymd_as_hashref( YYYYMMDD );
-
Given a date in YYYYMMDD format, return an anonymous hash with the keys:
year month day
TO DO
TBA
SEE ALSO
TBA
SOURCE AVAILABILITY
This source is in Github:
https://github.com/briandfoy/brick
AUTHOR
brian d foy, <bdfoy@cpan.org>
COPYRIGHT
Copyright © 2007-2018, brian d foy <bdfoy@cpan.org>. All rights reserved.
You may redistribute this under the terms of the Artistic License 2.0.