MIT License

项目介绍

thephpleague/period 是一个托管在 GitHub 上的开源项目,主要使用 PHP 编写,采用 MIT License 许可证,目前获得 731 个 Star、46 次 Fork。

仓库全名
thephpleague/period
开源许可证
MIT License
Star 数
731
Fork 数
46

README 摘要

Period ============ Period is PHP's missing time range API. This package covers all basic operations regarding time ranges. Highlights Represents Interval and Bounds as immutable value objects or enumeration Exposes named constructors to ease instantiation Covers all basic manipulations related to time range Enables working with simple or complex time ranges logic Fully documented Framework-agnostic Documentation…

完整内容见 GitHub 原始 README 或本页 。

常见问题

period 用什么语言开发?

主要使用 PHP 编写,采用 MIT License 许可证,目前有 731 个 Star。

period 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 period 的源码?

可以直接克隆仓库:git clone https://github.com/thephpleague/period.git,默认分支为 master;安装与运行步骤见仓库 README。

period 最近还在维护吗?

仓库最近一次更新为 1 周前,当前没有未关闭的 Issue;Star 数为 731,可作为社区活跃度的参考。

关于

PHP's time range API

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
836
价值分
453
活跃状态
活跃

语言占比

PHP

Release

README

Period

Author Latest Version Software License Build Total Downloads

Period is PHP’s missing time range API. This package covers all basic operations regarding time ranges.

Highlights

  • Represents Interval and Bounds as immutable value objects or enumeration
  • Exposes named constructors to ease instantiation
  • Covers all basic manipulations related to time range
  • Enables working with simple or complex time ranges logic
  • Fully documented
  • Framework-agnostic

Documentation

Full documentation can be found at period.thephpleague.com.

System Requirements

You need PHP >= 8.2.0 but the latest stable version of PHP is recommended.

Install

Install Period using Composer.

$ composer require league/period

or download the library and:

  • use any other PSR-4 compatible autoloader.
  • use the bundle autoloader script as shown below:
require 'path/to/period/repo/autoload.php';

use League\Period\Datepoint;

Datepoint::fromDateString('2012-05-23')->month()->toIso80000('Y-m-d');
//returns [2012-05-01, 2012-06-01)

where path/to/period/repo represents the path where the library was extracted.

Testing

Period has:

  • a PHPUnit test suite
  • a code analysis compliance test suite using PHPStan.
  • a coding style compliance test suite using PHP CS Fixer.

To run the tests, run the following command from the project folder.

$ composer test

Contributing

Contributions are welcome and will be fully credited. Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

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

评论

暂无评论