-$today = C4::Dates->new();
-$today_iso = $today->output('iso');
-$today_days = Date_to_Days( split( /-/, $today_iso ) );
+$today = dt_from_string;
+$today_iso = output_pref( { dt => $today, dateonly => 1, dateformat => 'iso' } );
+my ($tyear, $tmonth, $tday) = split( /-/, $today_iso );
+$today_days = Date_to_Days( $tyear, $tmonth, $tday );