This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Zaimki/locale/lad/calendar/DateLocal.vue

26 lines
572 B
Vue
Raw Normal View History

2021-12-29 06:46:09 -08:00
<template>
<span><span v-if="inline"> </span><br v-else/>{{heDate.toLocaleDateString('en-US-u-ca-hebrew', {
month: 'long',
year: 'numeric',
day: '2-digit'
})}}</span>
</template>
<script>
import HeDate from 'he-date';
export default {
props: {
day: { required: true },
inline: { type: Boolean },
},
computed: {
heDate() {
const HeDateClass = typeof(HeDate) === 'function' ? HeDate : window.HeDate;
2021-12-29 06:46:09 -08:00
return new HeDateClass(+this.day.toDate());
},
},
};
</script>