Profero Ltd. > Number-Compare-Date > Number::Compare::Date

Download:
Number-Compare-Date-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

NAME ^

Number::Compare::Date - Like Number::Compare, but for epoch seconds

SYNOPSIS ^

  use Number::Compare::Date;

  my $y2k = Number::Compare::Date->new(">=2000-01-01");

  if ($y2k->(time))
    { print "Run for the hills, the y2k bug's gonna eat you " }

DESCRIPTION ^

A simple extension to Number::Compare that allows you to compare dates against numbers (which should be epoch seconds.) The value that is compared can either be epoch seconds:

  my $perl583 = Number::Compare::Date->new("<1072915199");

Or it can be anything Date::Parse can recognise:

  my $perl583 = Number::Compare->new('<Wed, 31 Dec 2003 23:59:59');

If you don't use a comparison operator (<, <=, >= or >), then the module will check if the date is equal.

See Date::Parse for more formats.

AUTHOR ^

Written by Mark Fowler <mark@twoshortplanks.com>

Copyright Profero 2003. All Rights Reserved.

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

BUGS ^

Doesn't cope with anything outside the epoch range on your machine. Isn't DateTime compatible.

Bugs should be reported to the open source development team at Profero via the CPAN RT system.

http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Number::Compare::Date.

SEE ALSO ^

Date::Parse, Number::Compare

syntax highlighting: