Date::GoldenNumber - Calculates the golden number used in John Conway's date calculations


Date-Passover documentation Contained in the Date-Passover distribution.

Index


Code Index:

NAME

Top

Date::GoldenNumber - Calculates the golden number used in John Conway's date calculations

SYNOPSIS

Top

  use Date::GoldenNumber;
  $g = golden( 1992 );

DESCRIPTION

Top

Most of John Conway's date calculation algorithms need the golden number, which is Remainder(Y/19) + 1. Yes, this is very simple, but it is inconvenient to have to rember this.

SUPPORT

Top

datetime@perl.org

AUTHOR

Top

	Rich Bowen
	CPAN ID: RBOW
	rbowen@rcbowen.com
	http://www.rcbowen.com

COPYRIGHT

Top

SEE ALSO

Top

 perl
 Date::Easter
 Date::Passover


Date-Passover documentation Contained in the Date-Passover distribution.

#$Header: /home/cvs/date-passover/lib/Date/GoldenNumber.pm,v 1.1 2001/08/05 11:52:46 rbowen Exp $
package Date::GoldenNumber;
use strict;

BEGIN {
	use Exporter ();
	use vars qw ($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
	$VERSION     = (qw'$Revision')[1];
	@ISA         = qw (Exporter);
	#Give a hoot don't pollute, do not export more than needed by default
	@EXPORT      = qw (golden);
	@EXPORT_OK   = qw ();
	%EXPORT_TAGS = ();
}

sub golden {
    my $year = shift;
    my $g = ( $year % 19 ) + 1;
    return $g;
}

1;