mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-15 19:48:40 +00:00
Added datetime functionality
This commit is contained in:
parent
bc217f5490
commit
80a659d21a
|
|
@ -116,6 +116,16 @@ class SmartDateTime extends \DateTime
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function getEndOfMonth() : SmartDateTime
|
||||
{
|
||||
return new SmartDateTime($this->format('Y') . '-' . $this->format('m') . '-' . $this->getDaysOfMonth());
|
||||
}
|
||||
|
||||
public function getStartOfMonth() : SmartDateTime
|
||||
{
|
||||
return new SmartDateTime($this->format('Y') . '-' . $this->format('m') . '-01');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get days of current month
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user