定制 rbroen/datetime-practical 二次开发

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

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

rbroen/datetime-practical

Composer 安装命令:

composer require rbroen/datetime-practical

包简介

A practical way at looking at datetime events

README 文档

README

This library provides a useful object with a start moment and an end moment.

When using start and end in a full day mode, the start and end time should be 00:00:00, with the end date on the day AFTER the last full day. When displaying and/or editing as a full days, the code should present the last full day without the time.

Install

To install with composer:

composer require rbroen/datetime-practical

Requires PHP 8.2 or newer.

Usage

Here's a basic usage example:

<?php

require '/path/to/vendor/autoload.php';

$start = new DateTimeImmutable();

// This creates an event starting now and lasting 4 days and 4 hours.
$event = new \DateTimePractical\DateEvent($start, 'P4DT4H');

// This is an example with full days
$start = (new DateTimeImmutable())->modify('midnight');

$event = new \DateTimePractical\DateEvent($start, 'P4D', true);
$displayStr = (string) $event;

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2026-05-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固