ethiopian-calendar-date-converter-vue
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Ethio-European Date Converter - Vue

Vue composables to convert date-time values between Ethiopian and European/Gregorian calendar.


build and test Version License FOSSA Status

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.

Package Sidebar

Install

npm i ethiopian-calendar-date-converter-vue

Weekly Downloads

67

Version

1.0.2

License

MIT

Unpacked Size

123 kB

Total Files

28

Last publish

Collaborators

  • melaku