dayjs().format API to supply Buddhist Era (B.E.) format options.
Buddhist Era is a year numbering system that primarily used in mainland Southeast Asian countries of Cambodia, Laos, Myanmar and Thailand as well as in Sri Lanka and Chinese populations of Malaysia and Singapore for religious or official occasions (Wikipedia).
To calculate BE year manually, just add 543 to year. For example 26 May 1977 AD/CE should display as 26 May 2520 BE (1977 + 543).
var buddhistEra = require('dayjs/plugin/buddhistEra') dayjs.extend(buddhistEra) dayjs().format('BBBB BB')
List of added formats:
|2561||Full BE Year (Year + 543)|
|61||2-digit of BE Year|