#!/usr/bin/perl -w use strict; use Time::Local; use Seconds2English; my $date1 = epoch('2004-02-24'); my $date2 = epoch('1999-06-30'); my $diff = Seconds2English->new('start' => $date2 - $date1); print "The difference is " , int $diff->in_months, " months\n"; sub epoch { my ($year, $month, $day) = split '-' , shift; return timelocal(0 , 0 , 12, $day , $month - 1, $year); } __END__ The difference is 56 months