Revision a8b18c65
Von Moritz Bunkus vor mehr als 9 Jahren hinzugefügt
SL/Helper/DateTime.pm | ||
---|---|---|
77 | 77 |
$self->add_business_duration(%params); |
78 | 78 |
} |
79 | 79 |
|
80 |
sub end_of_month { |
|
81 |
my ($self) = @_; |
|
82 |
return $self->truncate(to => 'month')->add(months => 1)->subtract(days => 1); |
|
83 |
} |
|
84 |
|
|
80 | 85 |
1; |
81 | 86 |
|
82 | 87 |
__END__ |
... | ... | |
121 | 126 |
|
122 | 127 |
The legacy name C<from_lxoffice> is still supported. |
123 | 128 |
|
129 |
=item C<end_of_month> |
|
130 |
|
|
131 |
Sets the object to the last day of object's month at midnight. Returns |
|
132 |
the object itself. |
|
133 |
|
|
124 | 134 |
=back |
125 | 135 |
|
126 | 136 |
=head1 AUTHOR |
Auch abrufbar als: Unified diff
DateTime: neue Funktion end_of_month
Setzt $self auf den Start des letzten Tags eines Monats.