DateTime::Fiscal::Year - Calculate the day or week of the Fiscal Year with an arbitrary start date


NAME

DateTime::Fiscal::Year - Calculate the day or week of the Fiscal Year with an arbitrary start date

Back to Top


SYNOPSIS

  use DateTime;
  use DateTime::Fiscal::Year;
  my $dt = DateTime->new(year=>2003, month=>02, day=>01);
  my $dt2 = DateTime->new(year=>2003, month=>03, day=>01);
  my $fiscal = DateTime::Fiscal::Year->new( start => $dt );
  $fiscal->day_of_fiscal_year( $dt2 );
        or
  $fiscal->week_of_fiscal_year( $dt2 );
        or
  $fiscal->period_of_fiscal_year( 12, $dt2 );
        or
  $fiscal->quarter_fiscal_year( 13, $dt2 );

Back to Top


DESCRIPTION

This module allows you to calulate the day, week, period or quarter of a date in a fiscal year, given a start date and either a target date or number of periods and target date. This is often needed in business, where the fiscal year begins and ends on different days than the calendar year. This module is based on the Gregorian calendar. Using other DT calendar objects will return results, but the behavior is unpredicatable for calendars that have more than 365 or 366 days.

Back to Top


USAGE

This module implements the following methods:

Back to Top


SUPPORT

Support for this module can be obtained from:

datetime@perl.org

Back to Top


AUTHOR

Jesse Shy <jshy@pona.net>, thanks to Dave Rolsky for being brave enough to start the perl date-time project. I hope this helps anyone who has to build programs that due financial date calculations.

Back to Top


COPYRIGHT

Copyright (c) 2003 Jesse Shy. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

Back to Top


SEE ALSO

DateTime.pm, datetime@perl.org mailing list

http://datetime.perl.org

Back to Top

 DateTime::Fiscal::Year - Calculate the day or week of the Fiscal Year with an arbitrary start date