NAME

DateTime::Span::Birthdate - Date span of birthdays for an age

SYNOPSIS

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

DESCRIPTION

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.

AUTHOR

Tatsuhiko Miyagawa <miyagawa@bulknews.net>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

DateTime::Span, Date::Range::Birth