recca/chinese-military-number

將數字轉換成中文軍用數字

Fund package maintenance!
recca

Installs: 16

Dependents: 0

Suggesters: 0

Security: 0

Stars: 5

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/recca/chinese-military-number

v1.2.0 2025-11-10 16:05 UTC

This package is auto-updated.

Last update: 2025-11-10 16:06:40 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

將數字轉換成中文軍用數字

Support Spatie

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

安裝

You can install the package via composer:

composer require recca/chinese-military-number

使用

數字轉換

$chineseMilitaryNumber = new Recca\ChineseMilitaryNumber();
echo $chineseMilitaryNumber->format('0912'); // 洞勾么兩

時間轉換

$chineseMilitaryTime = new Recca\ChineseMilitaryTime();
$time = Carbon::create(2025, 1, 1, 9, 17, 0);
echo $chineseMilitaryTime->fromCarbon($time); // 洞勾么拐

使用現在時間

// 假設現在時間 12:00
$chineseMilitaryTime = new Recca\ChineseMilitaryTime();
echo $chineseMilitaryTime->now(); // 么兩洞洞

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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