xxxxxxxxxx
##### 2 Case
### Case 1
// Use Type : Intl.DateTimeFormatOptions
const longTimeformat: Intl.DateTimeFormatOptions = {
weekday: 'long',
year: 'numeric',
month: 'long',
day: 'numeric',
hour12: false
};
const dateNow = new Date().toLocaleTimeString('th-TH', longTimeformat);
// Output : วันอังคารที่ 14 กุมภาพันธ์ 2566 20:16:21
---------------------
### Case 2
// Cast : ' as const '
const shortTimeformat = {
weekday: 'long',
year: 'numeric',
month: 'long',
day: 'numeric',
hour12: false
} as const; // ------- $$$ cast to const [ as const ]
const shortDateNow = new Date().toLocaleTimeString('th-TH', shortTimeformat);
// Output : วันอังคารที่ 14 กุมภาพันธ์ 2566 20:16:21