X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/7964f8edfbc8b94076fff349d155c1fb00077c66..cc743b5424375dd3eaf5c3765f9372ca2da9890b:/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