Download src/utils/batch-timezone.js from VanyaJ/bada-terminal: direct link, hf CLI and curl.
- Browser
- Download file 490 Bytes
-
https://huggingface.co/VanyaJ/bada-terminal/resolve/main/src/utils/batch-timezone.js
- Command line
-
hf download hf://VanyaJ/bada-terminal/src/utils/batch-timezone.js
-
curl -L -o batch-timezone.js https://huggingface.co/VanyaJ/bada-terminal/resolve/main/src/utils/batch-timezone.js
490 Bytes
| /** ์ ์ฅ ์ IANA ์๊ฐ๋๋ฅผ ๊ณ ์ ํ์ฌ ์ฌ์์/ํธ์คํธ ์๊ฐ๋ ๋ณ๊ฒฝ์ ์ํฅ์ ๋ฐ์ง ์๊ฒ ํ๋ค. */ | |
| function batchTimezone(value, existing) { | |
| const timezone = value == null ? existing || Intl.DateTimeFormat().resolvedOptions().timeZone : value; | |
| if (typeof timezone !== 'string' || !timezone) throw new Error('Batch timezone is required'); | |
| new Intl.DateTimeFormat('en-US', { timeZone: timezone }).format(); | |
| return timezone; | |
| } | |
| module.exports = { batchTimezone }; | |