Release 2.0.25 (#4066)
* added support for hourly rate column in detail table * allow to register icon in extension * allow to show QR code secret * new translations * bump theme and packages * fix validation for invoice-document-filenames with uppercase character * max upload size 1MB * fix last month in daterange-picker in certain situations, more years in quick-select * remove unused package-versions-deprecated * link preferences from contract warning message * added page_setup page layout * prevent DROP TABLE in addSQL() and replace drop table with schema call * added azuyalabs/yasumi
This commit is contained in:
@@ -48,6 +48,14 @@ final class DateTimeFactory
|
||||
return $date;
|
||||
}
|
||||
|
||||
public function getStartOfLastMonth(): DateTimeInterface
|
||||
{
|
||||
$newDate = $this->createDateTime('first day of -1 month');
|
||||
$newDate->setTime(0, 0, 0);
|
||||
|
||||
return $newDate;
|
||||
}
|
||||
|
||||
private function getDate(DateTimeInterface|string|null $date = null): DateTime
|
||||
{
|
||||
if ($date === null) {
|
||||
@@ -105,6 +113,14 @@ final class DateTimeFactory
|
||||
return $date;
|
||||
}
|
||||
|
||||
public function getEndOfLastMonth(): DateTimeInterface
|
||||
{
|
||||
$newDate = $this->createDateTime('last day of -1 month');
|
||||
$newDate->setTime(23, 59, 59);
|
||||
|
||||
return $newDate;
|
||||
}
|
||||
|
||||
private function createWeekDateTime($year, $week, $day, $hour, $minute, $second)
|
||||
{
|
||||
$date = new DateTime('now', $this->getTimezone());
|
||||
|
||||
Reference in New Issue
Block a user