(npm) node-datetime-thai
ฟิเจอร์พื้นฐานสำหรับการใช้งาน:
- สำหรับการดึงข้อมูลวันที่ เวลา เป็นภาษาไทย
- วันจันทร์ - อาทิตย์
- เดือนมกราคม - ธันวาคม
- ปี พ.ศ. (ค.ศ. + 543)
การติดตั้ง - Install
This is on npm.
npm install --save node-datetime-thai
การประกาศใช้งาน - Initial
;
Method Available
- getThaiPattern
- getThaiDay
- getThaiFullDay
- getThaiMonth
- getThaiFullMonth
- getThaiYear
- getThaiFullDay
- toThaiString
- getThaiShortTime
- getThaiFormalShortTime
- getThaiFormalLongTime
And here's some code! 👍
var Now = ;console;
example
; var Now = ;var thai_pattern = Now; console;console; console;console; console;console; console;console;console;console;console;console; console;console;console;
Result
Method getThaiDay ศ
Method getThaiFullDay ศุกร์
Method getThaiMonth มิ.ย.
Method getThaiFullMonth มิถุนายน
Method getThaiYear 2560
Method getThaiFullDay ศุกร์
Method toThaiString minimal 2 มิ.ย. 2560
Method toThaiString partial 2 มิถุนายน 2560
Method toThaiString maximum วันศุกร์ที่ 2 มิถุนายน พ.ศ.2560
Method toThaiString minimal 2 มิ.ย. 2560
Method toThaiString partial 2 มิถุนายน 2560
Method toThaiString maximum วันศุกร์ที่ 2 มิถุนายน พ.ศ.2560
Method getThaiShortTime บ่ายโมง 43 นาที
Method getThaiFormalShortTime 13 นาฬิกา 43 นาที
Method getThaiFormalLongTime 13 นาฬิกา 43 นาที 40 วินาที
This is on GitHub so let me know if I've broked it somewhere.
REFERENCE
ROYIN สำนักงานราชบัณฑิตยสภา