<!--
Date formatée
-->

<template>
  <span>{{ datesFormatted }}</span>
</template>

<script setup lang="ts">
import {useDateUtils} from "~/composables/utils/useDateUtils";
import {computed, ComputedRef} from "@vue/reactivity";

const props = defineProps({
  data: {
    type: [String, Array],
    required: false,
    default: null
  }
})

const dateUtils = useDateUtils()

const datesFormatted: ComputedRef<string> = computed(() => {
  return dateUtils.format(props.data, 'DD/MM/YYYY')
})
</script>
