成都SKP导视横版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

18 lines
627 B

import { computed, toRefs } from 'vue'
import { useRootStore } from '@/store/root'
export const useDay = () => {
const days = {
zh: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
en: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
tw: ['星期日', '星期壹', '星期二', '星期三', '星期四', '星期五', '星期六']
} as const
const date = new Date()
const store = useRootStore()
const { language } = toRefs(store)
const whichWeek = computed(() => days[language.value][date.getDay()])
return { whichWeek }
}