1.0.54 • Published 8 months ago

@team-devmonster/date v1.0.54

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@team-devmonster/date

This is simple date module.

author: devmonster

We are always looking for investment or assistance. hompage: https://devmonster.co.kr email: aldegad@devmonster.co.kr

items

Getting started

$ npm install @team-devmonster/date@latest

Examples

Easy. Too Easy.

  today();
  // return today as YYYY-MM-DD
  today({ year: -1 });
  // return last year as YYYY-MM-DD
  today({ month: -1 });
  // return last month as YYYY-MM-DD
  today({ date: -1 });
  // return last date as YYYY-MM-DD
  today({ type: 'YYYY-MM-DD hh:mm:ss' });
  // return last date as YYYY-MM-DD hh:mm:ss

  toMonth();
  // return this Month as YYYY-MM
  toMonth({ year: -1 });
  // return last year as YYYY-MM
  toMonth({ month: -1 });
  // return last month as YYYY-MM
  toMonth({ date: -1 });
  // return last date as YYYY-MM

  toString(date:Date);
  // return date as YYYY-MM-DD

  compareTime({ date: '2022-12-31' });
  compareTime({ date: new Date() });
  // return compared time with now.
  // ex) 12월 31일, 1일전, 어제, 1시간 전, 1분 전, 방금전

  compareTime({ date: '2022-12-31', date2: '2023-01-01' });
  // return compared time date & date2.
  // ex) 12월 31일, 1일전, 어제, 1시간 전, 1분 전, 방금전

  compareTime({ date: '2022-12-31', date2: '2023-01-01', type: 'time' });
  // return compared time. as milliseconds.
  // ex) -3284343434, 3483489

devmonsters modules

for javascript

for react

for react-native

1.0.9

9 months ago

1.0.8

9 months ago

1.0.11

9 months ago

1.0.54

8 months ago

1.0.10

9 months ago

1.0.14

8 months ago

1.0.13

8 months ago

1.0.12

9 months ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago