定制 jizuscreed/time-approximator 二次开发

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

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

jizuscreed/time-approximator

Composer 安装命令:

composer require jizuscreed/time-approximator

包简介

A small library to generate short approximate human friendly time description. Inspired by https://github.com/martinandert/damals

README 文档

README

A small library to generate short approximate human friendly time description. Inspired by https://github.com/martinandert/damals

Installation

composer require jizuscreed/time-approximator

Instantiation

$timeApproximator = new jizuscreed\TimeApproximator\TimeApproximator(new \jizuscreed\TimeApproximator\Languages\Russian());

It can

$this->timeApproximator->getDescriptionFor(20); // полминуты
$this->timeApproximator->getDescriptionFor(40); // меньше чем 1 минута
$this->timeApproximator->getDescriptionFor(16*60); // 16 минут
$this->timeApproximator->getDescriptionFor(11*60); // 11 минут
$this->timeApproximator->getDescriptionFor(46*60); // примерно 1 час
$this->timeApproximator->getDescriptionFor(43*60); // 43 минуты
$this->timeApproximator->getDescriptionFor(68*60); // примерно 1 час
$this->timeApproximator->getDescriptionFor(24*60*60*15+23*60*60+15*600; // 16 дней)

Create language pack

Just create class in jizuscreed\TimeApproximator\Languages inheriting jizuscreed\TimeApproximator\Languages\AbstractLanguagePack and implement abstract methods

Contributing

Please, send your pull requests, especially with language packs

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD
  • 更新时间: 2020-03-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固