japanese-calendar

0.0.11 • Public • Published

japanese-calendar npm version

This module is for converting Japanese calendar

NPM

Install

cli

npm install -g japanese-calendar

js

npm install japanese-calendar

Usage

cli

Usage: japanese-calendar [options]
 
Options:
 
  -h, --help         output usage information
  -f, --from [from]  This flag specifies the calendar before conversion.
        Choose Calendar:
          c, Christian  : Christian Era
          m, Meiji      : Meiji
          t, Taisho     : Taisho
          s, Showa      : Showa
          h, Heisei     : Heisei
  -t, --to [to]  This flag specifies the calendar after conversion.
        Choose Calendar:
          c, Christian  : Christian Era
          m, Meiji      : Meiji
          t, Taisho     : Taisho
          s, Showa      : Showa
          h, Heisei     : Heisei
  -y, --year [year]  This flag specifies the year to be converted.
 
japanese-calendar -f christian -t heisei -y 2017
# 29 
 
japanese-calendar -f heisei -t christian -y 29
# 2017 
 
japanese-calendar -f heisei -t meiji -y 29
# 150 

js

const calendar = require('japanese-calendar');
 
console.log(calendar('christian', 'heisei', 2017));
// 29
 
console.log(calendar('heisei', 'christian', 29));
// 2017
 
console.log(calendar('heisei', 'meiji', 29));
// 150

License

MIT

Author

YuG1224

Readme

Keywords

Package Sidebar

Install

npm i japanese-calendar

Weekly Downloads

0

Version

0.0.11

License

MIT

Last publish

Collaborators

  • yug1224