Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/myxiaoao/laravel-carbon-chinese-macros
Laravel Carbon Chinese Macros
https://github.com/myxiaoao/laravel-carbon-chinese-macros
carbon chinese laravel laravel-package
Last synced: 2 days ago
JSON representation
Laravel Carbon Chinese Macros
- Host: GitHub
- URL: https://github.com/myxiaoao/laravel-carbon-chinese-macros
- Owner: myxiaoao
- License: mit
- Created: 2022-04-20T06:28:36.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-29T07:13:55.000Z (almost 2 years ago)
- Last Synced: 2024-04-28T00:44:46.169Z (7 months ago)
- Topics: carbon, chinese, laravel, laravel-package
- Language: PHP
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel Carbon Chinese Macros
![Packagist Version](https://img.shields.io/packagist/v/cooper/laravel-carbon-chinese-macros)
![Packagist License](https://img.shields.io/packagist/l/cooper/laravel-carbon-chinese-macros)
![GitHub Main Workflow Status](https://img.shields.io/github/actions/workflow/status/myxiaoao/laravel-carbon-chinese-macros/run-tests.yml?branch=main)`Illuminate\Support\Carbon` 中文拓展包
## 使用方法
### 阳历节日
- isNewYearsDay `元旦`
- isValentinesDay `情人节`
- isWomenDay `妇女节`
- isArborDay `植树节`
- isAprilFoolsDay `愚人节`
- isLabourDay `劳动节`
- isYouthDay `青年节`
- isChildrenDay `儿童节`
- isNationalDay `国庆节`
- isHalloween `万圣节`
- isChristmasEve `平安夜`
- isChristmasDay `圣诞节`### 阴历节日
- isChineseNewYearDay `春节`
- isFirstFullMoonDay `元宵节`
- isDragonBoatDay `端午节`
- isDoubleSeventhDay `七夕`
- isMidAutumnDay `中秋节`
- isDoubleNinthDay `重阳节`
- isLabaDay `腊八节`
- isNorthLittleNewYearDay `北方小年`
- isSouthLittleNewYearDay `南方小年`
- isChineseNewYearEve `除夕`### 其他
- getYearZodiac `获取生肖`
- getLunarYearName `获取干支纪年`
- getLunar `获取阴历日期`## 安装
#### 使用 Composer 安装
```
composer require cooper/laravel-carbon-chinese-macros
```## 例子
```php
isChristmasDay();
// true$day->isNewYearsDay();
// false
```## License
The MIT License (MIT). Please see [License File](LICENSE) for more information.