Merge branch 'bug_9211' into 3.12-master
This commit is contained in:
commit
af87780385
1 changed files with 7 additions and 0 deletions
|
@ -247,6 +247,13 @@ sub days_between {
|
|||
my $start_dt = shift;
|
||||
my $end_dt = shift;
|
||||
|
||||
if ( $start_dt->compare($end_dt) > 0 ) {
|
||||
# swap dates
|
||||
my $int_dt = $end_dt;
|
||||
$end_dt = $start_dt;
|
||||
$start_dt = $int_dt;
|
||||
}
|
||||
|
||||
|
||||
# start and end should not be closed days
|
||||
my $days = $start_dt->delta_days($end_dt)->delta_days;
|
||||
|
|
Loading…
Reference in a new issue