unity-calendar/components/main/calendar/today/weekday.vue

34 lines
638 B
Vue

<script setup>
const props = defineProps(['unitydate']);
function nth(n){return["st","nd","rd"][((n+90)%100-10)%10-1]||"th"};
</script>
<style>
.weekdayis {
text-align: right;
font-size: 2.4rem;
min-width: 75%;
margin-left: auto;
margin-right: 1.2rem;
}
@media (max-width: 720px) {
.weekdayis {
margin: 0;
text-align: center;
}
}
</style>
<template>
<div class="weekdayis">
It is the {{ unitydate.weekday + 1 }}{{ nth(unitydate.weekday + 1) }} day of the week, placeholder extra long day!
</div>
</template>