<!--
Date formatée
-->

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

<script setup lang="ts">
import { computed } from 'vue'
import type { ComputedRef } from 'vue'
import DateUtils from '~/services/utils/dateUtils'

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

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