Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 431 Bytes

add-start-range.md

File metadata and controls

14 lines (10 loc) · 431 Bytes

addStartRange

Returns a cloned DayjsRange object with a start-date amount of time added.

Example

import dayjsRange from 'dayjs-range-extend';

const dateRange = dayjsRange('2022-01-01', '2022-01-05');

const dateRangeAdd = dateRange.addStartRange(1, 'd');

dateRange.startDate.format('YYYY-MM-DD HH:mm:ss'); // => 2022-01-01 00:00:00
dateRangeAdd.startDate.format('YYYY-MM-DD HH:mm:ss'); // => 2022-01-02 00:00:00