Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

thai-date

archawat57MIT1.2.0

Convert user's input date ranges [String] to [Date].

date, thai, parser, convert

readme

thai-date

Convert Thai date range from String to Date

แปลงวันที่ภาษาไทยแบบช่วงวันที่ จาก String ให้เป็น Date

Example / ตัวอย่าง

const thaidate = require('thai-date');

const range = thaidate.getDateRanges('23-3 พฤศจิกายน 2562');

console.log(range);

// output

{ 
  from: 2019-10-22T17:00:00.000Z,
  fromText: '2019-10-23',
  to: 2019-11-02T17:00:00.000Z,
  toText: '2019-11-03'
}