diff options
author | Mitch Jackson <mitch@freeside.biz> | 2018-11-28 19:31:41 -0500 |
---|---|---|
committer | Mitch Jackson <mitch@freeside.biz> | 2018-11-28 19:33:33 -0500 |
commit | bb9e4d6e36cd509a307dbed69b2d3cee3078da17 (patch) | |
tree | 9bb3e6e4a0aa649794d1706a27a3ac2756c3c5cc | |
parent | d60447e139ed0a8a9f026738d1b844f072673cff (diff) |
RT# 32238 Billing Event cust_birthdate - Cleaner date compare window
-rw-r--r-- | FS/FS/part_event/Condition/cust_birthdate.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/FS/FS/part_event/Condition/cust_birthdate.pm b/FS/FS/part_event/Condition/cust_birthdate.pm index 56ce857cf..e8ecb061a 100644 --- a/FS/FS/part_event/Condition/cust_birthdate.pm +++ b/FS/FS/part_event/Condition/cust_birthdate.pm @@ -43,8 +43,10 @@ sub condition { die "Unparsable timeframe given: ".$self->option('timeframe'); } - my $ck_dt = DateTime->from_epoch( epoch => $opt{time} ); - my $bd_dt = DateTime->from_epoch( epoch => $birthdate ); + my $ck_dt = DateTime->from_epoch( epoch => $opt{time} ) + ->truncate( to => 'day' ); + my $bd_dt = DateTime->from_epoch( epoch => $birthdate ) + ->truncate( to => 'day' ); # Find the birthday for this calendar year. If customer birthday # has already passed this year, find the birthday for next year. |