PHPackages                             recca/chinese-military-number - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. recca/chinese-military-number

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

recca/chinese-military-number
=============================

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

v13.0.0(3mo ago)583[4 PRs](https://github.com/flamerecca/chinese-military-number/pulls)MITPHPPHP ^8.4||^8.3CI passing

Since Nov 3Pushed 2mo agoCompare

[ Source](https://github.com/flamerecca/chinese-military-number)[ Packagist](https://packagist.org/packages/recca/chinese-military-number)[ Docs](https://github.com/flamerecca/chinese-military-number)[ GitHub Sponsors](https://github.com/recca)[ RSS](/packages/recca-chinese-military-number/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (26)Versions (10)Used By (0)

中文軍用數字
======

[](#中文軍用數字)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e4219fd2bf7ce15d8e3942b23b0f0f6669b294e7d24ff734fe32c686cd4c21ca/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72656363612f6368696e6573652d6d696c69746172792d6e756d6265722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/recca/chinese-military-number)[![GitHub Tests Action Status](https://camo.githubusercontent.com/6dc1363987ef74770948285a70c7df77cce032199a415db293b5ca8f53d8eb3b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f666c616d6572656363612f6368696e6573652d6d696c69746172792d6e756d6265722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/flamerecca/chinese-military-number/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/8b47c73cb49fa7716a340c276d5fd6f44cc5706087b82b457aab4b0055743b21/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f666c616d6572656363612f6368696e6573652d6d696c69746172792d6e756d6265722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/flamerecca/chinese-military-number/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/25d4e9409c3995c2c1b5c842a12ba2b97ce9b6bb82998b2ebc65437ecca00de1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72656363612f6368696e6573652d6d696c69746172792d6e756d6265722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/recca/chinese-military-number)

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

Support Spatie
--------------

[](#support-spatie)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

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](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

安裝
--

[](#安裝)

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
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [recca](https://github.com/flamerecca)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance83

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~44 days

Total

4

Last Release

107d ago

Major Versions

v1.2.0 → v13.0.02026-03-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/e4750cc01b32a269082f0503e620ca5a7b0e4dbc6f54a6ac794e647ff36b7d97?d=identicon)[ReccaChao](/maintainers/ReccaChao)

---

Top Contributors

[![flamerecca](https://avatars.githubusercontent.com/u/82021?v=4)](https://github.com/flamerecca "flamerecca (24 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelreccachinesemilitarynumber

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/recca-chinese-military-number/health.svg)

```
[![Health](https://phpackages.com/badges/recca-chinese-military-number/health.svg)](https://phpackages.com/packages/recca-chinese-military-number)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[tarfin-labs/event-machine

Event-driven state machines for Laravel with event sourcing, type-safe context, and full audit trail.

199.4k](/packages/tarfin-labs-event-machine)[tapp/filament-form-builder

User facing form builder using Filament components

132.4k3](/packages/tapp-filament-form-builder)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
