PHPackages                             afiqiqmal/malaysiaholiday - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. afiqiqmal/malaysiaholiday

ActivePackage[API Development](/categories/api)

afiqiqmal/malaysiaholiday
=========================

to get all holidays date in malaysia

4.0.2(1y ago)329.0k—0%7[1 PRs](https://github.com/afiqiqmal/MalaysiaHoliday/pulls)MITPHPPHP &gt;=8.2CI passing

Since Jun 9Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/afiqiqmal/MalaysiaHoliday)[ Packagist](https://packagist.org/packages/afiqiqmal/malaysiaholiday)[ RSS](/packages/afiqiqmal-malaysiaholiday/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (22)Used By (0)

Malaysia Holidays ✈️
====================

[](#malaysia-holidays-airplane)

Parsing Malaysian Public Holidays

[![Build Status](https://camo.githubusercontent.com/25347156d680a3bbef40af10275af37e36e0220dbe5062360db28ca94fbd7806/68747470733a2f2f7472617669732d63692e6f72672f786d686166697a2f4d616c6179736961486f6c696461792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/afiqiqmal/MalaysiaHoliday)[![Coverage](https://camo.githubusercontent.com/c0ff3c47339f55e45a6bc2c56d67698942b268e0445256f0deb53b5cc95b80cf/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6166697169716d616c2f4d616c6179736961486f6c696461792e737667)](https://codecov.io/gh/afiqiqmal/MalaysiaHoliday)[![Packagist](https://camo.githubusercontent.com/3e5ec32299bdbe9704916242b4dddb2d49c8fe8c8ae436ca0ed3ee5fe63d0b42/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6166697169716d616c2f4d616c6179736961486f6c696461792e737667)](https://packagist.org/packages/afiqiqmal/MalaysiaHoliday)[![Packagist](https://camo.githubusercontent.com/c8d858f4465b1ab94f3db6aadc9193ebdb94cb18f6855ac2a45485ce6618a649/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6166697169716d616c2f4d616c6179736961486f6c696461792e737667)](https://packagist.org/packages/afiqiqmal/MalaysiaHoliday)[![Donate](https://camo.githubusercontent.com/604e3db9c8751116b3f765aad0353ec7ded655bbe8aaacbc38d8c4a6b784b3ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617950616c2d677265656e2e737667)](https://www.paypal.com/paypalme/mhi9388?locale.x=en_US)

[![](https://camo.githubusercontent.com/bcb47dd942b4622bd30821145d5ccabbae74e6ff4c3f0f01092f5ecbd01f4c47/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4d616c6179736961253230486f6c696461792e706e673f7468656d653d6461726b267061636b6167654e616d653d6166697169716d616c2532466d616c6179736961686f6c69646179267061747465726e3d63616765267374796c653d7374796c655f31266465736372697074696f6e3d50617273696e672b4d616c61797369612b5075626c69632b486f6c69646179266d643d3126666f6e7453697a653d313030707826696d616765733d676c6f6265)](https://camo.githubusercontent.com/bcb47dd942b4622bd30821145d5ccabbae74e6ff4c3f0f01092f5ecbd01f4c47/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4d616c6179736961253230486f6c696461792e706e673f7468656d653d6461726b267061636b6167654e616d653d6166697169716d616c2532466d616c6179736961686f6c69646179267061747465726e3d63616765267374796c653d7374796c655f31266465736372697074696f6e3d50617273696e672b4d616c61797369612b5075626c69632b486f6c69646179266d643d3126666f6e7453697a653d313030707826696d616765733d676c6f6265)

### Holidays based on country

[](#holidays-based-on-country)

If you want the list of holidays based on countries, you may refer here

### How to Use ✨

[](#how-to-use-sparkles)

Declare

```
$holiday = new MalaysiaHoliday;
MalaysiaHoliday::make();
app(MalaysiaHoliday::class); // if bound with laravel refer here - https://laravel.com/docs/8.x/container#contextual-binding
```

Holidays in current year

```
$holiday = new MalaysiaHoliday; // MalaysiaHoliday::make()
$holiday->fromAllState()->get();
MalaysiaHoliday::make()->fromAllState()->get();
```

Holidays in specific years

```
$holiday = new MalaysiaHoliday;
$holiday->fromAllState(2017)->get();
$holiday->fromAllState([2017, 2019])->get();
$holiday->fromAllState()->ofYear(2017)->get();
MalaysiaHoliday::make()->fromAllState()->ofYear(2017)->get();
```

Holidays by region

```
$holiday = new MalaysiaHoliday;
$holiday->fromState("Selangor")->get();
$holiday->fromState(["Selangor","Malacca"])->get();
```

Holidays by region and year

```
$holiday = new MalaysiaHoliday;
$holiday->fromState("Selangor","2017")->get();
$holiday->fromState("Selangor", [2017, 2019])->get();
$holiday->fromState(["Selangor","Malacca"], [2017, 2019])->get();
$holiday->fromState(["Selangor","Malacca"])->ofYear([2017, 2019])->get();
```

Group and filter results

```
$holiday = new MalaysiaHoliday;
$holiday->fromAllState()->groupByMonth()->get();
$holiday->fromAllState()->filterByMonth("January")->get();  //date('F')
```

### Requirements

[](#requirements)

PHP 7.0 and above (because 5.6 is too old 😝)

### To install

[](#to-install)

run

`composer require afiqiqmal/malaysiaholiday`

### Sample

[](#sample)

```
{
   "status":true,
   "data":[
      {
         "regional":"Selangor",
         "collection":[
            {
               "year":2019,
               "data":[
                  {
                     "day":"Tuesday",
                     "date":"2019-01-01",
                     "date_formatted":"01 January 2019",
                     "month":"January",
                     "name":"New Year's Day",
                     "description":"Regional Holiday",
                     "is_holiday":true,
                     "type":"Regional Holiday",
                     "type_id":4
                  },
                  {
                     "day":"Monday",
                     "date":"2019-01-21",
                     "date_formatted":"21 January 2019",
                     "month":"January",
                     "name":"Thaipusam",
                     "description":"Regional Holiday",
                     "is_holiday":true,
                     "type":"Regional Holiday",
                     "type_id":4
                  }
               ]
            }
         ]
      },
      {
         "regional":"Johor",
         "collection":[
            {
               "year":2019,
               "data":[
                  {
                     "day":"Monday",
                     "date":"2019-01-21",
                     "date_formatted":"21 January 2019",
                     "month":"January",
                     "name":"Thaipusam",
                     "description":"Regional Holiday",
                     "is_holiday":true,
                     "type":"Regional Holiday",
                     "type_id":4
                  }
               ]
            }
         ]
      }
   ],
   "developer":{
      "name":"Hafiq",
      "email":"hafiqiqmal93@gmail.com",
      "github":"https://github.com/afiqiqmal"
   }
}
```

### Source 📅

[](#source-date)

Scraped from -

### MIT Licence

[](#mit-licence)

Copyright © 2017 @afiqiqmal

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

### Donate to the project 🍵

[](#donate-to-the-project-tea)

[![](https://camo.githubusercontent.com/fae49c14c08b15cedc0f829bf690717f2edabe33f88a6c67f6f8f7225702abc6/68747470733a2f2f692e696d6775722e636f6d2f5932677172326a2e706e67)](https://www.paypal.com/paypalme/mhi9388?locale.x=en_US)

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance66

Regular maintenance activity

Popularity35

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity85

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 85.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~151 days

Recently: every ~97 days

Total

20

Last Release

387d ago

Major Versions

1.3.0 → 2.0.02020-10-04

2.1.1 → 3.0.02024-03-26

3.0.1 → 4.0.02024-11-27

PHP version history (6 changes)1.0.0PHP &gt;=5.3.0

1.1.0PHP &gt;=7.1

1.1.1PHP &gt;=5.6

1.3.0PHP &gt;=7.0

3.0.0PHP &gt;=8.0

4.0.1PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/1285084ec2d00e6c1442d03992cd156772da7267efdcbe59ac913c0676a9eb89?d=identicon)[afiqiqmal](/maintainers/afiqiqmal)

---

Top Contributors

[![afiqiqmal](https://avatars.githubusercontent.com/u/9051312?v=4)](https://github.com/afiqiqmal "afiqiqmal (71 commits)")[![jesslyw](https://avatars.githubusercontent.com/u/101371613?v=4)](https://github.com/jesslyw "jesslyw (5 commits)")[![xmhafiz](https://avatars.githubusercontent.com/u/20514319?v=4)](https://github.com/xmhafiz "xmhafiz (5 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![utrodus](https://avatars.githubusercontent.com/u/24326642?v=4)](https://github.com/utrodus "utrodus (1 commits)")

---

Tags

apicomposergouttehacktoberfestholidaylaravelmalaysiamalaysia-holidaypackagistphpscraperphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/afiqiqmal-malaysiaholiday/health.svg)

```
[![Health](https://phpackages.com/badges/afiqiqmal-malaysiaholiday/health.svg)](https://phpackages.com/packages/afiqiqmal-malaysiaholiday)
```

###  Alternatives

[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

47073.9k5](/packages/deepseek-php-deepseek-php-client)[google-gemini-php/symfony

Symfony Bundle for Gemini

149.4k1](/packages/google-gemini-php-symfony)[afiqiqmal/parcel-track

Api Parcel Tracking API

184.1k](/packages/afiqiqmal-parcel-track)[piteurstudio/satim-php

PHP package to interact with Satim.dz API

321.0k](/packages/piteurstudio-satim-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
