Jesse Shy > DateTime-Fiscal-Year > DateTime::Fiscal::Year

Download:
DateTime-Fiscal-Year-0.02.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Module Version: 0.02   Source  

NAME ^

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

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

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.

USAGE ^

This module implements the following methods:

SUPPORT ^

Support for this module can be obtained from:

datetime@perl.org

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.

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.

SEE ALSO ^

DateTime.pm, datetime@perl.org mailing list

http://datetime.perl.org

syntax highlighting: