Code Monkey home page Code Monkey logo

laravel-carbon-chinese-macros's Introduction

Laravel Carbon Chinese Macros

Packagist Version Packagist License GitHub Main Workflow Status

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

use Illuminate\Support\Carbon;

$day = Carbon::parse('2022-12-25');

$day->isChristmasDay();
// true

$day->isNewYearsDay();
// false

License

The MIT License (MIT). Please see License File for more information.

laravel-carbon-chinese-macros's People

Contributors

myxiaoao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.