@to-da-moon/thai-date
TypeScript icon, indicating that this package has built-in type declarations

0.0.17 • Public • Published

Acknowledgements

This library is free software based on dayjs. We just make it simple for thailand format display and TS support.

Getting Started

This library consists of 3 functions thaiDate, thaiTime, and thaiDay

Installation

using yarn

yarn add @to-da-moon/thai-date

using npm

npm i @to-da-moon/thai-date

Example Usage

thaiDate(new Date())
// return date in Buddha year
// e.g. 2021-10-04 -> 04/10/2564
thaiTime(new Date())
// return thai time  
// e.g. Thu, 07 Oct 2021 11:00:00 GMT -> 18:00
thaiDay(new Date())
// return จันทร์

Plan

  • [x] get day of the week in Thai language [done]
  • [ ] We will make more simple case for thai people formatting which will include the date in thai language

Package Sidebar

Install

npm i @to-da-moon/thai-date

Weekly Downloads

2

Version

0.0.17

License

MIT

Unpacked Size

315 kB

Total Files

40

Last publish

Collaborators

  • pakorndin
  • faithinyou