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)2501MITPHPPHP &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 2w 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 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

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

2625d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/46885679?v=4)[Yu Arataki](/maintainers/yutaki323)[@yutaki323](https://github.com/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

[philippbaschke/acf-pro-installer

An install helper for Advanced Custom Fields PRO

278724.6k](/packages/philippbaschke-acf-pro-installer)[alexsabur/orchid-editorjs-field

A orchid editorjs field

1327.4k](/packages/alexsabur-orchid-editorjs-field)[typisttech/wp-option-store

Extending WordPress Options API, read options from places other than database, the OOP way

1517.4k2](/packages/typisttech-wp-option-store)[cheprasov/php-parallel

The class allows you to run multiple operations parallel in different processes and send results to the main process. Useful if you need to run multiple independent operations simultaneously, instead of sequential execution, or if you run several independent queries, for example, queries to different data bases

1712.5k5](/packages/cheprasov-php-parallel)

PHPackages © 2026

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