Closed morrislaptop closed 3 years ago
Awesome PR, can I just say how much I appreciate you immediately switching to the new v2 style? That rarely happens and is super awesome!
What are your thoughts about how the period class is now split? Feel free to share your feedback here: https://github.com/spatie/period/pull/80
From https://github.com/spatie/period/pull/78
This PR adds a method to the period class,
ceilingEnd(?Precision $precision = null)
which will get the included end DateTime to the last second of the precision passed to this method.Useful when getting the end date of Period class in a DateTime object - for example if I passed Period::make('2018-01-01', '2018-01-15', Precision::DAY()), I would expect the endDate to be the end of 2018-01-15.. i.e. 23:59:59 that night.
It defaults to the current Precision of the period if not specified.
Usage: