承接 repat/date-constants 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

repat/date-constants

最新稳定版本:2.0.1

Composer 安装命令:

composer require repat/date-constants

包简介

A series of constants designed to make it easier to express dates in PHP applications

README 文档

README

Build Status Packagist

The Date Constants package defines a number of useful PHP constants within your application, making it easier to express measures of dates.

These constants may seem familiar to Laravel developers, as they're absolutely inspired by Nesbot\Carbons use of date constants. Also, shoutout to the stevegrunwell/time-constants package for the idea.

Installation

Date Constants is intended to be installed via Composer:

$ composer require repat/date-constants

The package has been configured to automatically expose the constants.php file via the Composer-generated autoloader, so you'll be ready to use the constants as soon as the package has been installed!

Defined constants

This is a list of all constants defined by this package, along with their values. Each constant is wrapped in a if (! defined(...)) conditional, ensuring these constants can easily be redefined if necessary and won't conflict with existing constants.

From Carbon

  • YEARS_PER_CENTURY (100)
  • YEARS_PER_DECADE (10)
  • MONTHS_PER_YEAR (12)
  • WEEKS_PER_YEAR (52)
  • DAYS_PER_WEEK (7)
  • HOURS_PER_DAY (24)

Days of the week

  • SUNDAY (0)
  • MONDAY (1)
  • TUESDAY (2)
  • WEDNESDAY (3)
  • THURSDAY (4)
  • FRIDAY (5)
  • SATURDAY (6)

Misc

  • DAYS_PER_YEAR (365)
  • DAYS_PER_LEAP_YEAR (366)
  • DAYS_PER_FORTNIGHT (14)

Months

  • JANUARY (1)
  • FEBRUARY (2)
  • MARCH (3)
  • APRIL (4)
  • MAY (5)
  • JUNE (6)
  • JULY (7)
  • AUGUST (8)
  • SEPTEMBER (9)
  • OCTOBER (19)
  • NOVEMBER (11)
  • DECEMBER (12)

Amount of days

  • DAYS_JAN (31)
  • DAYS_FEB (28)
  • DAYS_FEB_LEAP (29)
  • DAYS_MAR (31)
  • DAYS_APR (30)
  • DAYS_JUN (31)
  • DAYS_JUL (30)
  • DAYS_AUG (31)
  • DAYS_SEP (30)
  • DAYS_OCT (31)
  • DAYS_NOV (30)
  • DAYS_DEC (31)

TODO

  • Finish Tests

Version

  • Version 2.0.1

Contact

repat

Flattr this git repo

统计信息

  • 总下载量: 21.39k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-04-18