ethiopian-calendar-date-converter-vue
v1.0.2
Published
Convert dates between Ethiopian and European/Gregorian calendars
Downloads
49
Maintainers
Readme
Ethio-European Date Converter - Vue
Vue composables to convert date-time values between Ethiopian and European/Gregorian calendar.
Ethiopian calendar is unique for having 13 months, 12 months each with 30 days and 1 more month with 5 or 6 days. It is also 7/8 years behind the European/Gregorian calendar. This library contains Vue.js composables for conversion of the date formats back and forth.
Install
npm
npm install -S ethiopian-calendar-date-converter-vue ethiopian-calendar-date-converter
pnpm
pnpm install ethiopian-calendar-date-converter-vue ethiopian-calendar-date-converter
Usage
import { defineComponent } from 'vue'
import {
useEthTodayDateTimeText,
useCalendarConverter,
} from 'ethiopian-calendar-date-converter-vue'
export default defineComponent({
setup() {
const {
liveRefreshEnabled,
refreshEthDate,
ethTodayDateText,
ethTodayTimeText,
} = useEthTodayDateTimeText()
const { ethDate, eurCalString, setInitialCurrentDate } =
useCalendarConverter()
setInitialCurrentDate()
return {
liveRefreshEnabled,
refreshEthDate,
ethTodayDateText,
ethTodayTimeText,
ethDate,
eurCalString,
}
},
})
Demo
A sample web application using this library can be accessed at https://ethiopian-calendar.netlify.app
License
This project is licensed under the MIT license.