Hello, Tried to update FAQSimpleCalculations, got this error:
Can't open file 'database/FAQSampleCalculations' for output: Permission denied at /usr/local/share/perl/5.8.7/Spoon/ContentObject.pm line 92 at /usr/local/share/perl/5.8.7/Spoon/Base.pm line 110 (stack trace omitted) This is what I tried to add near the bottom of the page: ==== How can I calculate the difference in days between dates You need to use delta_days(). Twice. my $dt1 = DateTime->new( year => 2009, month => 1, day => 1 ); my $dt2 = DateTime->new( year => 2010, month => 1, day => 1 ); my $days = $dt1->delta_days($dt2)->delta_days; # $days becomes 365
