Permalink
Switch branches/tags
stable gitpan_version/20380119 gitpan_version/20030810 gitpan_version/20030809 gitpan_version/20030808 gitpan_version/20030807 gitpan_version/20030806 gitpan_version/20030805 gitpan_version/20030804 gitpan_version/20030803 gitpan_version/20030802 gitpan_version/20030801 gitpan_version/20030731 gitpan_version/20030730 gitpan_version/20030729 gitpan_version/20030728 gitpan_version/20030726 gitpan_version/20030725 gitpan_version/20030724 gitpan_version/20030723 gitpan_version/20030722 gitpan_version/20030721 gitpan_version/20030720 gitpan_version/20030719 gitpan_version/20030718 gitpan_version/20030717 gitpan_version/20030716 gitpan_version/20030715 gitpan_version/20030714 cpan_version/20380119 cpan_version/20030810 cpan_version/20030809 cpan_version/20030808 cpan_version/20030807 cpan_version/20030806 cpan_version/20030805 cpan_version/20030804 cpan_version/20030803 cpan_version/20030802 cpan_version/20030801 cpan_version/20030731 cpan_version/20030730 cpan_version/20030729 cpan_version/20030728 cpan_version/20030726 cpan_version/20030725 cpan_version/20030724 cpan_version/20030723 cpan_version/20030722 cpan_version/20030721 cpan_version/20030720 cpan_version/20030719 cpan_version/20030718 cpan_version/20030717 cpan_version/20030716 cpan_version/20030715 cpan_version/20030714 cpan_path/MERLYN/Acme-Current-20380119.tar.gz cpan_path/MERLYN/Acme-Current-20030810.tar.gz cpan_path/MERLYN/Acme-Current-20030809.tar.gz cpan_path/MERLYN/Acme-Current-20030808.tar.gz cpan_path/MERLYN/Acme-Current-20030807.tar.gz cpan_path/MERLYN/Acme-Current-20030806.tar.gz cpan_path/MERLYN/Acme-Current-20030805.tar.gz cpan_path/MERLYN/Acme-Current-20030804.tar.gz cpan_path/MERLYN/Acme-Current-20030803.tar.gz cpan_path/MERLYN/Acme-Current-20030802.tar.gz cpan_path/MERLYN/Acme-Current-20030801.tar.gz cpan_path/MERLYN/Acme-Current-20030731.tar.gz cpan_path/MERLYN/Acme-Current-20030730.tar.gz cpan_path/MERLYN/Acme-Current-20030729.tar.gz cpan_path/MERLYN/Acme-Current-20030728.tar.gz cpan_path/MERLYN/Acme-Current-20030726.tar.gz cpan_path/MERLYN/Acme-Current-20030725.tar.gz cpan_path/MERLYN/Acme-Current-20030724.tar.gz cpan_path/MERLYN/Acme-Current-20030723.tar.gz cpan_path/MERLYN/Acme-Current-20030722.tar.gz cpan_path/MERLYN/Acme-Current-20030721.tar.gz cpan_path/MERLYN/Acme-Current-20030720.tar.gz cpan_path/MERLYN/Acme-Current-20030719.tar.gz cpan_path/MERLYN/Acme-Current-20030718.tar.gz cpan_path/MERLYN/Acme-Current-20030717.tar.gz cpan_path/MERLYN/Acme-Current-20030716.tar.gz cpan_path/MERLYN/Acme-Current-20030715.tar.gz cpan_path/MERLYN/Acme-Current-20030714.tar.gz MERLYN
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
72 lines (45 sloc) 1.47 KB
package Acme::Current;
use strict;
use vars qw($VERSION);
use vars qw($YEAR $MONTH $DAY);
my @now = gmtime;
$YEAR = $now[5] + 1900;
$MONTH = $now[4] + 1;
$DAY = $now[3];
$VERSION = 20380119; # epoch max {grin}
1;
__END__
=head1 NAME
Acme::Current - Determine current year, month, day (GMT)
=head1 SYNOPSIS
use Acme::Current;
printf "It's now %04d/%02d/%02d.\n",
$Acme::Current::YEAR,
$Acme::Current::MONTH,
$Acme::Current::DAY;
if ($Acme::Current::MONTH == 12 and $Acme::Current::DAY == 25) {
print "Merry Christmas!\n";
}
=head1 DESCRIPTION
C<Acme::Current> gives you all the power of those myriad of date/time
modules without all that complexity, as long as all you want is the
current date (GMT-based).
=head1 EXPORT
Nothing. You need to use C<$Acme::Current::YEAR> to get the year,
and so on.
=head1 BUGS
None known. A bug in previous versions that required frequent
updating of the module seems to have been fixed.
=head1 SEE ALSO
C<Date::Manip>, and a hundred other date and time modules.
See L<http://perltraining.stonehenge.com> for all your Perl training
needs.
=head1 AUTHOR
Randal L. Schwartz, E<lt>merlyn@stonehenge.comE<gt>,
L<http://www.stonehenge.com/merlyn/>.
Based on an idea from a conversation with Joshua Hoblitt.
=head1 COPYRIGHT AND LICENSE
Copyright 2003 by Randal L. Schwartz, Stonehenge Consulting Services, Inc.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut