{"id":15939443,"url":"https://github.com/afiqiqmal/malaysiaholiday","last_synced_at":"2025-04-07T10:21:40.674Z","repository":{"id":21675853,"uuid":"93696073","full_name":"afiqiqmal/MalaysiaHoliday","owner":"afiqiqmal","description":"Get list of holiday in Malaysia's Calendar","archived":false,"fork":false,"pushed_at":"2025-01-13T03:39:05.000Z","size":215,"stargazers_count":30,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T10:21:10.848Z","etag":null,"topics":["api","composer","goutte","hacktoberfest","holiday","laravel","malaysia","malaysia-holiday","packagist","php","scraper"],"latest_commit_sha":null,"homepage":"","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/afiqiqmal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-08T01:45:33.000Z","updated_at":"2025-03-19T02:23:53.000Z","dependencies_parsed_at":"2025-02-28T06:09:47.097Z","dependency_job_id":"3df9a66c-2cd8-4d11-87ec-31a089db886b","html_url":"https://github.com/afiqiqmal/MalaysiaHoliday","commit_stats":{"total_commits":68,"total_committers":6,"mean_commits":"11.333333333333334","dds":"0.23529411764705888","last_synced_commit":"e7bf948bae7296d55b6e3a0c9474ad694ccd5bb7"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afiqiqmal%2FMalaysiaHoliday","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afiqiqmal%2FMalaysiaHoliday/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afiqiqmal%2FMalaysiaHoliday/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afiqiqmal%2FMalaysiaHoliday/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afiqiqmal","download_url":"https://codeload.github.com/afiqiqmal/MalaysiaHoliday/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247631925,"owners_count":20970083,"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":["api","composer","goutte","hacktoberfest","holiday","laravel","malaysia","malaysia-holiday","packagist","php","scraper"],"created_at":"2024-10-07T06:04:35.932Z","updated_at":"2025-04-07T10:21:40.656Z","avatar_url":"https://github.com/afiqiqmal.png","language":"PHP","funding_links":["https://www.paypal.com/paypalme/mhi9388?locale.x=en_US"],"categories":[],"sub_categories":[],"readme":"# Malaysia Holidays :airplane:\nParsing Malaysian Public Holidays\n\n[![Build Status](https://travis-ci.org/xmhafiz/MalaysiaHoliday.svg?branch=master)](https://travis-ci.org/afiqiqmal/MalaysiaHoliday)\n[![Coverage](https://img.shields.io/codecov/c/github/afiqiqmal/MalaysiaHoliday.svg)](https://codecov.io/gh/afiqiqmal/MalaysiaHoliday)\n[![Packagist](https://img.shields.io/packagist/dt/afiqiqmal/MalaysiaHoliday.svg)](https://packagist.org/packages/afiqiqmal/MalaysiaHoliday)\n[![Packagist](https://img.shields.io/packagist/v/afiqiqmal/MalaysiaHoliday.svg)](https://packagist.org/packages/afiqiqmal/MalaysiaHoliday)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/paypalme/mhi9388?locale.x=en_US)\n\n\n![](https://banners.beyondco.de/Malaysia%20Holiday.png?theme=dark\u0026packageName=afiqiqmal%2Fmalaysiaholiday\u0026pattern=cage\u0026style=style_1\u0026description=Parsing+Malaysia+Public+Holiday\u0026md=1\u0026fontSize=100px\u0026images=globe)\n\n\n### Holidays based on country\nIf you want the list of holidays based on countries, you may refer here https://github.com/afiqiqmal/country-holiday\n\n\n### How to Use :sparkles:\n\nDeclare\n```php\n$holiday = new MalaysiaHoliday;\nMalaysiaHoliday::make();\napp(MalaysiaHoliday::class); // if bound with laravel refer here - https://laravel.com/docs/8.x/container#contextual-binding\n```\n\n\nHolidays in current year\n\n```php\n$holiday = new MalaysiaHoliday; // MalaysiaHoliday::make()\n$holiday-\u003efromAllState()-\u003eget();\nMalaysiaHoliday::make()-\u003efromAllState()-\u003eget();\n```\n\nHolidays in specific years\n\n```php\n$holiday = new MalaysiaHoliday;\n$holiday-\u003efromAllState(2017)-\u003eget();\n$holiday-\u003efromAllState([2017, 2019])-\u003eget();\n$holiday-\u003efromAllState()-\u003eofYear(2017)-\u003eget();\nMalaysiaHoliday::make()-\u003efromAllState()-\u003eofYear(2017)-\u003eget();\n```\n\nHolidays by region\n\n```php\n$holiday = new MalaysiaHoliday;\n$holiday-\u003efromState(\"Selangor\")-\u003eget();\n$holiday-\u003efromState([\"Selangor\",\"Malacca\"])-\u003eget();\n```\n\nHolidays by region and year\n\n```php\n$holiday = new MalaysiaHoliday;\n$holiday-\u003efromState(\"Selangor\",\"2017\")-\u003eget();\n$holiday-\u003efromState(\"Selangor\", [2017, 2019])-\u003eget();\n$holiday-\u003efromState([\"Selangor\",\"Malacca\"], [2017, 2019])-\u003eget();\n$holiday-\u003efromState([\"Selangor\",\"Malacca\"])-\u003eofYear([2017, 2019])-\u003eget();\n```\n\n\nGroup and filter results\n\n```php\n$holiday = new MalaysiaHoliday;\n$holiday-\u003efromAllState()-\u003egroupByMonth()-\u003eget();\n$holiday-\u003efromAllState()-\u003efilterByMonth(\"January\")-\u003eget();  //date('F')\n```\n\n### Requirements\nPHP 7.0 and above (because 5.6 is too old 😝)\n\n### To install\n\nrun\n\n`composer require afiqiqmal/malaysiaholiday`\n\n### Sample\n\u003cpre\u003e\n{\n   \"status\":true,\n   \"data\":[\n      {\n         \"regional\":\"Selangor\",\n         \"collection\":[\n            {\n               \"year\":2019,\n               \"data\":[\n                  {\n                     \"day\":\"Tuesday\",\n                     \"date\":\"2019-01-01\",\n                     \"date_formatted\":\"01 January 2019\",\n                     \"month\":\"January\",\n                     \"name\":\"New Year's Day\",\n                     \"description\":\"Regional Holiday\",\n                     \"is_holiday\":true,\n                     \"type\":\"Regional Holiday\",\n                     \"type_id\":4\n                  },\n                  {\n                     \"day\":\"Monday\",\n                     \"date\":\"2019-01-21\",\n                     \"date_formatted\":\"21 January 2019\",\n                     \"month\":\"January\",\n                     \"name\":\"Thaipusam\",\n                     \"description\":\"Regional Holiday\",\n                     \"is_holiday\":true,\n                     \"type\":\"Regional Holiday\",\n                     \"type_id\":4\n                  }\n               ]\n            }\n         ]\n      },\n      {\n         \"regional\":\"Johor\",\n         \"collection\":[\n            {\n               \"year\":2019,\n               \"data\":[\n                  {\n                     \"day\":\"Monday\",\n                     \"date\":\"2019-01-21\",\n                     \"date_formatted\":\"21 January 2019\",\n                     \"month\":\"January\",\n                     \"name\":\"Thaipusam\",\n                     \"description\":\"Regional Holiday\",\n                     \"is_holiday\":true,\n                     \"type\":\"Regional Holiday\",\n                     \"type_id\":4\n                  }\n               ]\n            }\n         ]\n      }\n   ],\n   \"developer\":{\n      \"name\":\"Hafiq\",\n      \"email\":\"hafiqiqmal93@gmail.com\",\n      \"github\":\"https://github.com/afiqiqmal\"\n   }\n}\n\u003c/pre\u003e\n\n### Source :date:\n\nScraped from - http://www.officeholidays.com/countries/malaysia\n\n### MIT Licence\n\nCopyright © 2017 @afiqiqmal\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the “Software”), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\n\u003cbr\u003e\n\n### Donate to the project :tea: \n\n\u003ca href=\"https://www.paypal.com/paypalme/mhi9388?locale.x=en_US\"\u003e\u003cimg src=\"https://i.imgur.com/Y2gqr2j.png\" height=\"40\"\u003e\u003c/a\u003e \n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafiqiqmal%2Fmalaysiaholiday","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafiqiqmal%2Fmalaysiaholiday","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafiqiqmal%2Fmalaysiaholiday/lists"}