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

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

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

alcamo/time

最新稳定版本:0.2.5

Composer 安装命令:

composer require alcamo/time

包简介

Date/time-related classes

README 文档

README

use alcamo\time\Duration;

$duration = new Duration('P0M1DT02.50S');

echo "$duration\n";

echo $duration->getTotalMinutes() . "\n";

echo $duration->getTotalSeconds() . "\n";

This will output:

P1DT2.5S
1440
86402.5

Unlike PHP's built-in DateInterval::__construct(), Duration::__construct() can handle fractions of seconds.

Furthermore, methods are provided to get the total number of days, hours, minutes and seconds.

Provided classes

  • Duration Duration adding features to DateInterval
  • PosixFormat Posix date/time format

See the doxygen documentation for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2023-01-17