simplecomplex/time 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

simplecomplex/time

Composer 安装命令:

composer require simplecomplex/time

包简介

Time extends native DateTime class to fix shortcomings and defects, and provide more, simpler and safer getters and setters

README 文档

README

composer namespace: simplecomplex/time

Time

extends native \DateTime to fix shortcomings and defects, and provide more properties, getters and setters.

Features

  • enhanced timezone awareness
  • diff which works correctly with non-UTC timezones
  • safer formatting and modifying
  • is stringable (sic!), to ISO-8601
  • JSON serializes to string ISO-8601 with timezone marker
  • freezable
  • directly accessible time part properties
  • more, simpler and safer getters and setters

Related classes

TimeInterval

has the same properties as native \DateInterval plus signed relatives and totals, and works with non-UTC timezones.

Time::diffTime()

returns interval with actual differences.

Time::diffDstIgnorant()

returns an interval which ignores daylight saving time shift.
In everyday business you often don't want the difference between a date outside daylight saving time (DST)
and a date inside DST to be off by the DST offset.
That offset can be particularly nasty if either of the dates is at or close to midnight,
because then the days difference may get 1 off.

TimeSpan

It's main feature is to check overlap vs. another TimeSpan.

TimeImmutable

Is an immutable extending Time, not \DateTimeImmutable.

TimeLocal

Forces instances to be in local (default) timezone.

Requirements

  • PHP >=7.2 (64-bit)

Development requirements

Suggestions

MIT licensed

License and copyright. Explained.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固