+use vars qw(@days @ldays @month);
+@days = (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
+@ldays = (31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
+@month = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
+
+sub alloc($$$)
+{
+ my ($pkg, $year, $thing) = @_;
+ return bless [$year, $thing], ref($pkg)||$pkg;
+}
+
+sub copy
+{
+ my $old = shift;
+ return $old->alloc(@$old);
+}
+
+sub cmp($$)
+{
+ my ($a, $b) = @_;
+ return $a->[1] - $b->[1] if ($a->[0] == $b->[0]);
+ return $a->[0] - $b->[0];
+}
+
+sub year
+{
+ return $_[0]->[0];
+}
+
+sub thing
+{
+ return $_[0]->[1];
+}