Skip to content

Instantly share code, notes, and snippets.

@kocsismate
Last active April 27, 2023 06:12
Show Gist options
  • Save kocsismate/0cb51dda882abba926d83a0222862b10 to your computer and use it in GitHub Desktop.
Save kocsismate/0cb51dda882abba926d83a0222862b10 to your computer and use it in GitHub Desktop.
Instantiating DatePeriod
Targets
Occurrences of 'new DatePeriod\(' in Directory popular-package-analysis/sources with mask '*.php'
popular-package-analysis (11 usages found)
sources/cakephp/chronos/src/Traits (1 usage found)
DifferenceTrait.php (1 usage found)
192 $period = new DatePeriod($start, $ci, $end);
sources/league/period/src (9 usages found)
Period.php (9 usages found)
787 return new DatePeriod(
834 Bounds::IncludeStartExcludeEnd => new DatePeriod($this->startDate, $duration, $this->endDate),
835 Bounds::ExcludeAll => new DatePeriod($this->startDate, $duration, $this->endDate, DatePeriod::EXCLUDE_START_DATE),
836 Bounds::IncludeAll => new DatePeriod($this->startDate, $duration, $this->endDate, DatePeriod::INCLUDE_END_DATE),
837 Bounds::ExcludeStartIncludeEnd => new DatePeriod($this->startDate, $duration, $this->endDate, DatePeriod::EXCLUDE_START_DATE | DatePeriod::INCLUDE_END_DATE),
840 Bounds::IncludeStartExcludeEnd => new DatePeriod($this->startDate, $duration, $this->endDate),
841 Bounds::ExcludeAll => new DatePeriod($this->startDate, $duration, $this->endDate, DatePeriod::EXCLUDE_START_DATE),
842 Bounds::IncludeAll => new DatePeriod($this->startDate, $duration, $this->endDate->add($duration)),
843 Bounds::ExcludeStartIncludeEnd => new DatePeriod($this->startDate, $duration, $this->endDate->add($duration), DatePeriod::EXCLUDE_START_DATE),
sources/spatie/period/src (1 usage found)
Period.php (1 usage found)
70 return new DatePeriod(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment