Skip to content

This npm package allows for the conversion of Japanese era (和暦) to the Western calendar (西暦) and vice versa. Simply import the package and use the provided functions to convert between the two calendars with ease.

License

Notifications You must be signed in to change notification settings

kzhrk/wareki-utils

Repository files navigation

wareki-utils

The wareki-utils allows for the conversion of Japanese era (和暦) to the Western calendar (西暦) and vice versa. Simply import the package and use the provided functions to convert between the two calendars with ease.

Install

$ npm install wareki-utils

Usage

Convert Japanese era to the Western calendar

import { warekiUtils } from 'wareki-utils';

warekiUtils('昭和62年4月30日'); // 1987-04-30

Convert the Western calendar to Japanese era

import { warekiUtils } from 'wareki-utils';

warekiUtils(new Date('1987-04-30')); // 昭和62年4月30日

Licence

MIT

Author

Kazuhiro Kobayashi

About

This npm package allows for the conversion of Japanese era (和暦) to the Western calendar (西暦) and vice versa. Simply import the package and use the provided functions to convert between the two calendars with ease.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published