PHPackages                             yutaki323/wareki - 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. yutaki323/wareki

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

yutaki323/wareki
================

日付文字列を元号＋和暦数字の表記に変換するPHPのクラスです。

1.0.2(7y ago)2491MITPHPPHP &gt;=5.2

Since Apr 23Pushed 7y agoCompare

[ Source](https://github.com/yutaki323/wareki)[ Packagist](https://packagist.org/packages/yutaki323/wareki)[ RSS](/packages/yutaki323-wareki/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (4)Used By (0)

wareki
======

[](#wareki)

日付文字列を元号＋和暦数字の表記に変換するPHPのクラスです。 令和反映済み。

旧システムでも使えるようPHP5でも動作するように書きました。

アルファベット表記、漢数字にも対応しています。 (年度は9999年が上限です)

install
-------

[](#install)

```
composer require yutaki323/wareki

```

usage
-----

[](#usage)

### 基本

[](#基本)

```
use Wareki\Wareki;

$wareki = new Wareki;
echo $wareki->format();

```

(今日が2019年4月30日なら)

> 平成31年

### 元号

[](#元号)

```
$wareki = new Wareki('2019-04-30');
echo $wareki->format('{gengou}{nendo}年');

```

> 平成31年

```
$wareki = new Wareki('2019-04-30');
echo $wareki->format('{gengou.short}.{nendo}');

```

> H.31

### 年度を漢数字にする

[](#年度を漢数字にする)

```
$wareki = new Wareki('2019-04-30');
echo $wareki->format('{gengou}{nendo.kanji}年');

```

> 平成三十一年

```
$wareki = new Wareki('2019-05-01');
echo $wareki->format('{gengou}{nendo.kanji}年');

```

> 令和元年

```
$wareki = new Wareki('2019-05-01');
echo $wareki->format('{gengou}の{nendo.kansuji}年');

```

> 令和の一年

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.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 ~0 days

Total

3

Last Release

2579d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/23ecd8071fbf5a9346a04c8b16a9d86e43b2f27121cd97690c00e3d55a3dd73b?d=identicon)[yutaki323](/maintainers/yutaki323)

---

Top Contributors

[![yu-arataki](https://avatars.githubusercontent.com/u/15905909?v=4)](https://github.com/yu-arataki "yu-arataki (10 commits)")[![yutaki323](https://avatars.githubusercontent.com/u/46885679?v=4)](https://github.com/yutaki323 "yutaki323 (3 commits)")

---

Tags

datephptoolwareki

### Embed Badge

![Health badge](/badges/yutaki323-wareki/health.svg)

```
[![Health](https://phpackages.com/badges/yutaki323-wareki/health.svg)](https://phpackages.com/packages/yutaki323-wareki)
```

###  Alternatives

[viison/address-splitter

Tries to split an address line into street name, house number and other additional information like building, apartment information etc.

1034.6M15](/packages/viison-address-splitter)[sonata-project/classification-bundle

Symfony SonataClassificationBundle

913.2M20](/packages/sonata-project-classification-bundle)[php-stubs/woocommerce-stubs

WooCommerce function and class declaration stubs for static analysis.

942.9M66](/packages/php-stubs-woocommerce-stubs)[laminas/laminas-paginator

Paginate collections of data from arbitrary sources

245.7M84](/packages/laminas-laminas-paginator)

PHPackages © 2026

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