The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Time::Tradedates - Perl extension for last and first trade dates in a month

SYNOPSIS

  use Time::Tradedates;
  $return = &getNumDays($edate);      # Pass in an epoch (UNIX) date.
                                      # See timelocal and localtime functions
                                      # Returns the number of days in the month
  $return = &lastTradeDay($mon,$year,$integer);
                                      # Pass in Perl Month (i.e. Jan=0), 4 digit year
                                      # and an integer.  0 = last trade day, -1 = LTD-1
                                      # At this time only 0 and -1 are supported other
                                      # Values will return 0
                                      # Returns the last trade day or LTD-1
  $return = &firstTradeDay($mon,$year);
                                      # Pass in Perl Month (i.e. Jan=0) and 4 digit year
                                      # Returns the first trade day

DESCRIPTION

This module is for companies that need to do processing only on the last trade date of the month and/or N number of days before the last trade date. It will also be extended to provide the first trade date of the month. It is Leap Year sensitive!

It should be used to check the current date and find out if that date is one of the days you specified for processing. If not, simply exit.

AUTHOR

David S. Spizzirro (dspizz@dspizz.com)

SEE ALSO

Time::Local, localtime(), timelocal()