承接 ixnode/php-timezone 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

ixnode/php-timezone

最新稳定版本:0.1.25

Composer 安装命令:

composer require ixnode/php-timezone

包简介

PHP Timezone - This library converts different timezone strings.

README 文档

README

This library converts different timezone strings.

Usage

use Ixnode\PhpTimezone\Timezone;

Get country code from given timezone.

print (new Timezone('Europe/Berlin'))->getCountryCode();
// (string) "DE"

Get country name in english from given timezone.

print (new Timezone('Europe/Berlin'))->getCountryName();
// (string) "Germany"

Get country name in german from given timezone.

use Ixnode\PhpTimezone\Constants\Locale

print (new Timezone('Europe/Berlin'))->getCountryName(Locale::DE_DE);
// (string) "Deutschland"

Get some locale language names in different languages

use Ixnode\PhpTimezone\Constants\Locale
use Ixnode\PhpTimezone\Constants\LocaleTranslation

print LocaleTranslation::DE_DE[Locale::DE_DE];
// (string) "Deutsch (Deutschland)"
print LocaleTranslation::DE_DE[Locale::ES_ES];
// (string) "Alemán (Alemania)"
print LocaleTranslation::NN_NO[Locale::IT_IT];
// (string) "Norvegese nynorsk (Norvegia)"

etc.

Get some language names in different languages

use Ixnode\PhpTimezone\Constants\Language

print Language::DE['de'];
// (string) "Deutsch"
print Language::DE['sv'];
// (string) "Tyska"
print Language::SV['en'];
// (string) "Swedish"

etc.

Installation

composer require ixnode/php-timezone
vendor/bin/php-timezone -V
php-timezone 0.1.0 (12-19-2022 01:17:26) - Björn Hempel <bjoern@hempel.li>

Development

git clone git@github.com:ixnode/php-timezone.git && cd php-timezone
composer install
composer test

License

This tool is licensed under the MIT License - see the LICENSE file for details

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-30