定制 chinleung/php-weekday 二次开发

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

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

chinleung/php-weekday

最新稳定版本:v2.0.0

Composer 安装命令:

composer require chinleung/php-weekday

包简介

Easily get name of weekday and value from name between different languages.

README 文档

README

Latest Version on Packagist Build Status Quality Score Total Downloads

Easily get name of weekday and value from name between different languages.

Installation

You can install the package via composer:

composer require chinleung/php-weekday

Usage

Retrieve a name from a value

Weekday::getNameFromValue(0, 'en'); // Sunday
(new Weekday(0, 'en'))->getName(); // Sunday

Retrieving a name from a value for a different locale

Weekday::getNameFromValue(0, 'fr'); // Dimanche
(new Weekday(0, 'en'))->getName('fr'); // Dimanche

Retrieving a value from the name

Weekday::getValueFromName('Sunday', 'en'); // 0
Weekday::getValueFromName('Lundi', 'fr'); // 1
(new Weekday('wednesday', 'en'))->getName(); // 3

Retrieving all names for a locale

Weekday::getNames('en'); // ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']

Changing the locale of an instance

(new Weekday(1, 'en'))->setLocale('fr')->getName(); // Lundi

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email hello@chinleung.com instead of using the issue tracker.

Credits

License

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

PHP Package Boilerplate

This package was generated using the PHP Package Boilerplate.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-07-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固