DateTime::Span::Birthdate - Date span of birthdays for an age
use DateTime::Span::Birthdate; # birthday span for people who are 28 years old today my $span = DateTime::Span::Birthdate->new(age => 28); # birthday span for 20 years old in $dt my $span = DateTime::Span::Birthdate->new(age => 28, on => $dt); # birthday span for teenagers my $span = DateTime::Span::Birthdate->new(from => 13, to => 19);
DateTime::Span::Birthdate is a port of Date::Range::Birth module and works with DateTime::Span object. This module allows you to say "who is now 28 years old, based on their birthday dates?"
This would be particularly useful when you build an SQL query to, say, select teenagers from your customers database which has 'birthday' datetime column.
Tatsuhiko Miyagawa <miyagawa@bulknews.net>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
DateTime::Span, Date::Range::Birth
To install DateTime::Span::Birthdate, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DateTime::Span::Birthdate
CPAN shell
perl -MCPAN -e shell install DateTime::Span::Birthdate
For more information on module installation, please visit the detailed CPAN module installation guide.