jnjxp/calerator

Calendar date iterators

dev-develop 2016-11-25 12:05 UTC

This package is auto-updated.

Last update: 2024-10-26 09:16:04 UTC


README

Iterate over dates like a calendar.

  • Year is a collection of Months.
  • Month is a collection of Weeks.
  • Week is a collection of Days.

Install

composer require jnjxp/calerator

Usage

foreach (new Year(2016) as $month) {
    foreach($month as $week) {
        foreach ($week as $day){
            //...
        }
    }
}