PHPackages                             yajima-tatsuro/jp-area-converter - 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. yajima-tatsuro/jp-area-converter

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

yajima-tatsuro/jp-area-converter
================================

Convert between tsubo, jo, and square meters (Japanese area units).

v1.0.0(7mo ago)00MITPHPPHP &gt;=8.1CI passing

Since Oct 14Pushed 7mo agoCompare

[ Source](https://github.com/Tatsurou-Yajima/jp-area-converter)[ Packagist](https://packagist.org/packages/yajima-tatsuro/jp-area-converter)[ Docs](https://github.com/Tatsurou-Yajima/jp-area-converter)[ RSS](/packages/yajima-tatsuro-jp-area-converter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Japanese Area Converter
=======================

[](#japanese-area-converter)

日本の面積単位（坪、畳、平方メートル）を相互変換するPHPパッケージです。

インストール
------

[](#インストール)

```
composer require yajima-tatsuro/jp-area-converter
```

使用方法
----

[](#使用方法)

```
use JapaneseAreaConverter\AreaConverter;

$converter = new AreaConverter();

// 坪から平方メートルに変換
$result = $converter->fromTsubo(10.0)->toSquareMeter(); // 33.0579

// 畳から平方メートルに変換
$result = $converter->fromJo(6.0)->toSquareMeter(); // 9.9174

// 平方メートルから坪に変換
$result = $converter->fromSquareMeter(30.0)->toTsubo(); // 9.075

// 平方メートルから畳に変換
$result = $converter->fromSquareMeter(20.0)->toJo(); // 12.0999
```

### 複数の単位への変換

[](#複数の単位への変換)

```
$converter = new AreaConverter();

// 同じ値から複数の単位に変換
$squareMeters = $converter->fromSquareMeter(30.0)->toSquareMeter(); // 30.0
$tsubo = $converter->fromSquareMeter(30.0)->toTsubo(); // 9.075
$jo = $converter->fromSquareMeter(30.0)->toJo(); // 18.15
```

### すべての変換パターン

[](#すべての変換パターン)

```
$converter = new AreaConverter();

// 平米→坪の変換
$result = $converter->fromSquareMeter(30.0)->toTsubo(); // 9.075

// 平米→畳の変換
$result = $converter->fromSquareMeter(20.0)->toJo(); // 12.0999

// 坪→平米の変換
$result = $converter->fromTsubo(10.0)->toSquareMeter(); // 33.0579

// 坪→畳の変換
$result = $converter->fromTsubo(1.0)->toJo(); // 2.0

// 畳→平米の変換
$result = $converter->fromJo(6.0)->toSquareMeter(); // 9.9174

// 畳→坪の変換
$result = $converter->fromJo(2.0)->toTsubo(); // 1.0
```

変換率
---

[](#変換率)

- 1坪 = 3.30579平方メートル
- 1畳 = 1.6529平方メートル
- 1坪 = 2畳

引数の型
----

[](#引数の型)

引数は整数でも小数でも指定できます。PHPが自動的に適切な型に変換します。

```
$converter = new AreaConverter();

// 整数でも正常に動作
$result = $converter->fromSquareMeter(20)->toJo(); // 12.0999

// 小数でも同じ結果
$result = $converter->fromSquareMeter(20.0)->toJo(); // 12.0999
```

小数点の扱い
------

[](#小数点の扱い)

このパッケージでは、すべての変換結果を**小数点第4位までで四捨五入**して返します。

```
$converter = new AreaConverter();

// 例：10平方メートルを坪に変換
$result = $converter->fromSquareMeter(10.0)->toTsubo(); // 3.025

// 例：10平方メートルを畳に変換
$result = $converter->fromSquareMeter(10.0)->toJo(); // 6.05
```

### 四捨五入の例

[](#四捨五入の例)

入力値変換先計算結果四捨五入後10.0㎡坪3.0251...3.02510.0㎡畳6.0502...6.0530.0㎡坪9.0751...9.075畳について
-----

[](#畳について)

「畳」は地域によってサイズが異なりますが、このパッケージでは全国統一の標準サイズ（1.6529平方メートル）で計算しています。

要件
--

[](#要件)

- PHP 8.1以上

ライセンス
-----

[](#ライセンス)

MIT License

開発
--

[](#開発)

### テストの実行

[](#テストの実行)

```
composer test
```

### コードスタイルの修正

[](#コードスタイルの修正)

```
composer cs-fix
```

### コードスタイルのチェック

[](#コードスタイルのチェック)

```
composer cs-check
```

### PHP CodeSniffer

[](#php-codesniffer)

```
composer phpcs
composer phpcbf
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance65

Regular maintenance activity

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% 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

Unknown

Total

1

Last Release

211d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/194191010cb4559eb0b5476db5a4a848f00cb1510c643e1bf521028df6fce72b?d=identicon)[Tatsuro Yajima](/maintainers/Tatsuro%20Yajima)

---

Top Contributors

[![Tatsurou-Yajima](https://avatars.githubusercontent.com/u/44424270?v=4)](https://github.com/Tatsurou-Yajima "Tatsurou-Yajima (4 commits)")[![dmmboost-tyajima](https://avatars.githubusercontent.com/u/180141804?v=4)](https://github.com/dmmboost-tyajima "dmmboost-tyajima (1 commits)")

---

Tags

phpconverterjapanareatsubosquare-meterjo

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/yajima-tatsuro-jp-area-converter/health.svg)

```
[![Health](https://phpackages.com/badges/yajima-tatsuro-jp-area-converter/health.svg)](https://phpackages.com/packages/yajima-tatsuro-jp-area-converter)
```

###  Alternatives

[cartalyst/converter

A framework agnostic measurement conversion and formatting package featuring multiple types of measurements and currency conversion.

88434.4k7](/packages/cartalyst-converter)

PHPackages © 2026

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