26 lines
572 B
Vue
26 lines
572 B
Vue
<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;
|
|
|
|
return new HeDateClass(+this.day.toDate());
|
|
},
|
|
},
|
|
};
|
|
</script>
|