1.0.4 • Published 3 years ago
wareki-utils v1.0.4
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-utilsUsage
Convert Japanese era to the Western calendar
import { warekiUtils } from 'wareki-utils';
warekiUtils('昭和62年4月30日'); // 1987-04-30Convert the Western calendar to Japanese era
import { warekiUtils } from 'wareki-utils';
warekiUtils(new Date('1987-04-30')); // 昭和62年4月30日Licence
MIT