0.0.19 • Published 3 years ago

@lailao10x/laotime v0.0.19

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

laotime

Convert date time to lao language format.
ປ່ຽນເວລາເປັນ format ພາສາລາວ.

Installation

# using npm
npm install @lailao10x/laotime

# using yarn
yarn add @lailao10x/laotime

Usage

# using require
const laotime = require('@lailao10x/laotime');

# using import
import laotime from '@lailao10x/laotime';

Example

const getLaotime = laotime("2021-08-24 08:01");
console.log(getLaotime); // 24 ສິງຫາ 2021

or;

const getLaotime = laotime("2021-08-24 08:03", "D M Y, H:MN:S");
console.log(getLaotime); // 24 ສິງຫາ 2021, 08:03:00

or;

const getLaotime = laotime("2021-08-24", "D M Y, H:MN:S");
console.log(getLaotime); // 24 ສິງຫາ 2021, 08:03:00

or;

const getLaotime = laotime(new Date(), "D/M/Y, H:MN:S");
console.log(getLaotime); // 24/ສິງຫາ/2021, 08:03:00

or;

const getLaotime = laotime(new Date().getTime(), "D M Y, H:MN:S");
console.log(getLaotime); // 24 ສິງຫາ 2021, 08:03:00

or;

const getLaotime = laotime(new Date(), "W");
console.log(getLaotime); // ພະຫັດ

or;

const getLaotime = laotime();
console.log(getLaotime); // ສະແດງວັນເວລາປະຈຸບັນ

Tokens and meanings are as follows:

TokenMeaning
D or date or DATEDate
M or month or MONTHMonth
Y or year or YEARYear
H or hour or HOURHour
MNor minute or MINUTEMinute
S or second or SECONDSecond
W or week_day or dayor WEEK_DAYWeek day

Messaegs

ຖ້າຫາກວັນເວລາທີ່ປ້ອນເຂົ້ານັ້ນບໍ່ຖືກຕ້ອງ laotime ຈະສົ່ງຄ່າກັບ Invalid Data

0.0.19

3 years ago

0.0.16

3 years ago

0.0.17

3 years ago

0.0.18

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.1

3 years ago