Open zlayine opened 3 months ago
thanks for the stackblitz, you might just be calling the composaible wrong, try this:
<template>
<div>current timezone: {{ getTimezone() }}</div>
</template>
<script setup>
const dayJs = useDayjs();
const getTimezone = () => {
return dayJs.tz.guess();
};
</script>
also it might not be required but if you run into issues you may need to add this dep:
"devDependencies": {
"dayjs": "^1.11.12",
"dayjs-nuxt": "^2.1.9"
}
I have an issue accessing
guess
with the timezone for Nuxt 3.config:
Reproduction:
https://stackblitz.com/edit/nuxt-starter-xkk6vr?file=app.vue