Skip to content

Commit

Permalink
add 令和(reiwa)
Browse files Browse the repository at this point in the history
  • Loading branch information
Keichi Wada committed Apr 1, 2019
1 parent d2bef53 commit 5d88b86
Show file tree
Hide file tree
Showing 9 changed files with 1,305 additions and 2,037 deletions.
6 changes: 5 additions & 1 deletion README.md
Expand Up @@ -23,7 +23,7 @@ Or you can import directly via CDN.

### wareki2era( JapaneseEraDate ) : String

> `japaneseEraDate` shoud be `(明治|大正|昭和|平成)YYYY年MM月DD日`
> `japaneseEraDate` shoud be `(明治|大正|昭和|平成|令和)YYYY年MM月DD日`
**CommonJS (node.js) || ES6 or later (babel)**

Expand Down Expand Up @@ -69,6 +69,10 @@ In addition `j` option is return japanese date of string.
wareki2era(jpnEra, "j"); // 1912年12月10日
```

## Changelog

- **version 1.0.0** : Adapted '令和'

## Credit

Special thanks to [http://sm.2-d.jp](http://sm.2-d.jp/ktoi.js)'s liblary. `wareki2era.js` is using it while converting kan-suji(漢数字) to Arabic number.
Expand Down
2 changes: 1 addition & 1 deletion dist/wareki2era.browser.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions index.html
Expand Up @@ -13,6 +13,7 @@
<script src="./dist/wareki2era.browser.js" charset="utf-8"></script>

<script>

var arr = [{
key: '明治元年三月二日', // 0
val: "1868-03-02"
Expand Down Expand Up @@ -47,6 +48,14 @@
{
key: '平成二〇年七月六日', // 5
val: "2008-07-06"
},
{
key: '令和元年七月六日', // 5
val: "2019-07-06"
},
{
key: '令和二年七月六日', // 5
val: "2020-07-06"
}

];
Expand Down
2 changes: 1 addition & 1 deletion index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5d88b86

Please sign in to comment.