or download this
my $birthday = '2000-01-02'; # yyyy-mm-dd
use Date::Calc qw/Delta_Days Today Add_Delta_YMD/;
...
$date[0] = (Today())[0]; # set the year to current year
print Delta_Days( Add_Delta_YMD(@date,-1,0,0), @date ); # days since
+last one
print Delta_Days( @date, Add_Delta_YMD(@date,1,0,0) ); # days until
+next one