定制 a2htray/cp-date-fns 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

a2htray/cp-date-fns

Composer 安装命令:

composer require a2htray/cp-date-fns

包简介

copy of javascript lib 'date-fns'

README 文档

README

The implementation of JavaScript Library date-fns by using PHP

Copy from date-fns

Installation

We can simply add the package into our project by using Composer to run the command below:

composer require a2htray/cp-date-fns:dev-master

Table of methods

Method Description
Utils::addYears Return the date added serveral years
Utils::addQuarters Return the date add several quarters
Utils::addMonths Return the date add several months
Utils::addDays Return the date add several days
Utils::addHours Return the date add several hours
Utils::addMinutes Return the date add several minutes
Utils::addSeconds Return the date add serveral seconds
Utils::addMilliseconds Return the date add serveral milliseconds
Utils::closeIndexTo Return an index of the closest date from the array comparing to the given date
Utils::compareAsc Compare two dates return 1、-1 or 0
Utils::compareDesc Compare two dates return 1、-1 or 0
Utils::differenceInDays Get the number of full days between two given dates
Utils::differenceInHours Get the number of hours between two given dates
Utils::differenceInCalendarDays Get the number of calendar days between two given dates
Utils::differenceInCalendarMonths Get the number of calendar months between two given dates
Utils::differenceInCalendarQuarters Get the number of calendar quarters between two given dates
Utils::differenceInCalendarYears Get the number of calendar years between two given dates
Utils::getQuarter Return the order of the given date in current year
Utils::getMilliseconds Return the milliseconds of the given date
Utils::startOfDay Get the start date of the given date
Utils::subDays Subtract serveral days form the given date, then return the date after subtraction
Utils::subHours Subtract serveral hours form the given date, then return the date after subtraction
Utils::endOfDay Get the end date of the given date
Utils::endOfDecade Get the date which is the end date of current decade of the given date
Utils::endOfHour Get the date which is the end date of current hour of the given date
Utils::endOfMonth Get the date which is the end date of current month of the given date
Utils::endOfMinute Get the date which is the end date of current minute of the given date
Utils::endOfSecond Get the date which is the end date of current second of the given date
Utils::endOfWeek Get the date which is the end date of current week of the given date
Utils::endOfYear Get the date which is the end date of current year of the given date
Utils::endOfQuarter Get the date which is the end date of current quarter of the given date
Utils::isMonday Whether is Monday
Utils::isTuesday Whether is Tuesday
Utils::isWednesday Whether is Wednesday
Utils::isThursday Whether is Thursday
Utils::isFriday Whether is Friday
Utils::isSaturday Whether is Saturday
Utils::isSunday Whether is Sunday
Utils::isSameDay Whether is same between two given dates
Utils::isFirstDayOfMonth Whether is the first day of the month
Utils::isLastDayOfMonth Whether is the last day of the month

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固