{"id":24380515,"url":"https://github.com/solution10/calendar","last_synced_at":"2025-06-16T03:36:59.750Z","repository":{"id":18898100,"uuid":"22116254","full_name":"solution10/calendar","owner":"solution10","description":"Straightforward calendars, with events, for any templating system.","archived":false,"fork":false,"pushed_at":"2017-06-06T14:58:55.000Z","size":85,"stargazers_count":30,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T22:54:22.473Z","etag":null,"topics":["calendar","composer-packages","php"],"latest_commit_sha":null,"homepage":"http://solution10.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solution10.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-22T18:42:33.000Z","updated_at":"2023-12-03T19:56:52.000Z","dependencies_parsed_at":"2022-07-16T17:00:28.741Z","dependency_job_id":null,"html_url":"https://github.com/solution10/calendar","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solution10%2Fcalendar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solution10%2Fcalendar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solution10%2Fcalendar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solution10%2Fcalendar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solution10","download_url":"https://codeload.github.com/solution10/calendar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248312172,"owners_count":21082638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["calendar","composer-packages","php"],"created_at":"2025-01-19T08:19:34.670Z","updated_at":"2025-04-10T22:54:27.519Z","avatar_url":"https://github.com/solution10.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Solution10\\Calendar\n\nThe Calendar component is a simple, but powerful package to help you in the rendering of, well, Calendars!\n\n[![Build Status](https://travis-ci.org/Solution10/calendar.svg?branch=master)](https://travis-ci.org/Solution10/calendar)\n[![Latest Stable Version](https://poser.pugx.org/solution10/calendar/v/stable.svg)](https://packagist.org/packages/solution10/calendar)\n[![Total Downloads](https://poser.pugx.org/solution10/calendar/downloads.svg)](https://packagist.org/packages/solution10/calendar)\n[![License](https://poser.pugx.org/solution10/calendar/license.svg)](https://packagist.org/packages/solution10/calendar)\n\n## Features\n\n- No dependancies\n- PHP 5.3+\n- Straightforward interface\n- Support for multiple \"resolutions\" (week view, month view etc)\n- Easily extended\n- Templating system agnostic\n\n## Getting Started\n\nInstallation is via composer, in the usual manner:\n\n```json\n{\n    \"require\": {\n        \"solution10/calendar\": \"^1.0\"\n    }\n}\n```\n\nCreating a basic calendar is as such:\n\n```php\n\u003c?php\n// Creates a calendar, using today as a starting point.\n$calendar = new Solution10\\Calendar\\Calendar(new DateTime('now'));\n\n// We now need to give the calendar a \"resolution\". This tells the\n// Calendar whether we're showing a month view, or a Week, or maybe\n// even a whole year. Let's start with a Month:\n\n$calendar-\u003esetResolution(new MonthResolution());\n\n// That's it! Let's grab the view data and render:\n$viewData = $calendar-\u003eviewData();\n$months = $viewData['contents'];\n?\u003e\n\n\u003c?php foreach ($months as $month): ?\u003e\n\u003ctable\u003e\n    \u003ccaption\u003e\u003c?php echo $month-\u003etitle('F Y'); ?\u003e\u003c/caption\u003e\n    \u003cthead\u003e\n        \u003ctr\u003e\n            \u003c?php foreach ($month-\u003eweeks()[0]-\u003edays() as $day): ?\u003e\n                \u003cth\u003e\u003c?php echo $day-\u003edate()-\u003eformat('D'); ?\u003e\u003c/th\u003e\n            \u003c?php endforeach; ?\u003e\n        \u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n        \u003c?php foreach ($month-\u003eweeks() as $week): ?\u003e\n            \u003ctr\u003e\n                \u003c?php foreach ($week-\u003edays() as $day): ?\u003e\n                    \u003ctd\u003e\n                        \u003c?php\n                            if ($day-\u003eisOverflow()) {\n                                if ($calendar-\u003eresolution()-\u003eshowOverflowDays()) {\n                                    echo '\u003cspan style=\"color: #ccc\"\u003e'.$day-\u003edate()-\u003eformat('d').'\u003c/span\u003e';\n                                } else {\n                                    echo '\u0026nbsp;';\n                                }\n                            } else {\n                                echo $day-\u003edate()-\u003eformat('d');\n                            }\n                        ?\u003e\n                    \u003c/td\u003e\n                \u003c?php endforeach; ?\u003e\n            \u003c/tr\u003e\n        \u003c?php endforeach; ?\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c?php endforeach; ?\u003e\n```\n\nSolution10\\Calendar does not provide you with templates as we have no idea what templating\nengine (if any) you're using. Instead, we give you a powerful and simple API so you can\ndo the rendering yourself.\n\n## Further Reading\n\n### Userguide\n\nFor more information on creating Calendars, see the [Calendars Section](http://github.com/solution10/calendar/wiki/Calendars).\n\nIf you want to know more about Resolutions, check out the [Resolutions Section](http://github.com/solution10/calendar/wiki/Resolutions).\n\nWant to see how you can add Events to your calendars? You'll be wanting the [Events Section](http://github.com/solution10/calendar/wiki/Events).\n\n## PHP Requirements\n\n- PHP \u003e= 5.3\n\n## Author\n\nAlex Gisby: [GitHub](http://github.com/alexgisby), [Twitter](http://twitter.com/alexgisby)\n\n## License\n\n[MIT](http://github.com/solution10/calendar/tree/master/LICENSE.md)\n\n## Contributing\n\n[Contributors Notes](http://github.com/solution10/calendar/tree/master/CONTRIBUTING.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolution10%2Fcalendar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolution10%2Fcalendar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolution10%2Fcalendar/lists"}