Add Request day().add(object)
See original GitHub issueDescribe the bug Hi,
I kind of like this project, I’d like to use it to add an object instead of just using add(value: number, unit: string). I was using moment before but im moving into using dayjs because its way smaller.
Expected behavior
const maxTimestamp = moment(this.endDate.value.valueOf()) .utc() .startOf('day'); maxTimestamp.add({ hours: minTime.slice(0, 2), minutes: minTime.slice(3, 5) });
Trying to switch that into:
const maxTimestamp = day(this.endDate.value.valueOf()) .utc() .startOf('day'); maxTimestamp.add({ hours: minTime.slice(0, 2), minutes: minTime.slice(3, 5) });
Information
- Day.js Version [e.g. v1.0.0]
- OS: [e.g. iOS]
- Browser [e.g. chrome 62]
Issue Analytics
- State:
- Created 4 years ago
- Comments:25 (7 by maintainers)
Top GitHub Comments
Yes, we could support this as a plugin to add a time object.
We just released the ObjectSupport plugin to support this. https://day.js.org/docs/en/plugin/object-support