X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/3572290bd2b7ccd3ec734335968195f0d5177a3d..a8b18c65bfd47c845e641fb0fff9587f4122bf9d:/SL/Helper/DateTime.pm diff --git a/SL/Helper/DateTime.pm b/SL/Helper/DateTime.pm index 138a8f3f4..547c4b94b 100644 --- a/SL/Helper/DateTime.pm +++ b/SL/Helper/DateTime.pm @@ -77,6 +77,11 @@ sub subtract_businessdays { $self->add_business_duration(%params); } +sub end_of_month { + my ($self) = @_; + return $self->truncate(to => 'month')->add(months => 1)->subtract(days => 1); +} + 1; __END__ @@ -121,6 +126,11 @@ component (as opposed to L). The legacy name C is still supported. +=item C + +Sets the object to the last day of object's month at midnight. Returns +the object itself. + =back =head1 AUTHOR