<script setup>
import moment from "moment";
import "moment/dist/locale/tr";

const props = defineProps({
  date: {
    type: [Number, String],
    required: true,
  },
  format: {
    type: String,
    default: "lll",
  },
});

const output = () => {
  moment.locale("tr");
  return moment(props.date).format(props.format);
};
</script>
<template>
  <span>{{ output() }}</span>
</template>
