joys-utils
TypeScript icon, indicating that this package has built-in type declarations

2.3.3 • Public • Published

joys-utils

🛠 utils

Installation

yarn add joys-utils
or
npm i joys-utils

Usage

periodTime

Return time an object containing the start and end fields.

The default is the East American time zone, which starts on Monday as a week.

// returns with hours, minutes and seconds
import { periodTime } from 'joys-utils';
periodTime({
  start: 'start_time',
  end: 'end_time',
  format: 'YYYY-MM-DD HH:mm:ss',
});

=> {start_time: '2018-07-08 08:43:15', end_time: '2018-07-08 08:43:15'}
Property Description Type Default
start start time name string 'start_date'
end end time name string 'end_date'
format time format string 'YYYY-MM-DD'
defaultTime default initial time today | yesterday | week | month | lastMonth today
tz time zone est | beiJing est

Readme

Keywords

Package Sidebar

Install

npm i joys-utils

Weekly Downloads

5

Version

2.3.3

License

ISC

Unpacked Size

36.3 kB

Total Files

27

Last publish

Collaborators

  • bearcookie