public/components/Date.vue

14 lines
372 B
Vue
Raw Normal View History

<script setup lang="ts">
import { getPrettyDate, getUtcDate } from "~~/shared/metadata";
2024-03-01 13:01:21 -05:00
import type { AnyParsedContent } from "~~/shared/types";
2024-10-16 13:25:13 -04:00
const { doc } = defineProps<{ doc: AnyParsedContent }>();
2024-10-16 13:25:13 -04:00
const prettyDate = getPrettyDate(doc);
const utcDate = getUtcDate(doc);
</script>
<template>
2022-12-02 01:06:07 -05:00
<time pubdate :datetime="utcDate">{{ prettyDate }}</time>
</template>