How to use the min function from moment-timezone
Find comprehensive JavaScript moment-timezone.min code examples handpicked from public code repositorys.
GitHub: hammad-air/time-slots
139 140 141 142 143 144 145 146 147 148
.filter( (slot) => slot.start >= bufferStart && slot.end <= bufferEnd ) .map((slot) => { const startSlot = moment.max(slot.start, bufferStart); const endSlot = moment.min(slot.end, bufferEnd); const slotDuration = moment.duration(endSlot.diff(startSlot)); const slotObj = { start: startSlot.toString(), end: endSlot.toString(),
0
0
0
moment-timezone.tz is the most popular function in moment-timezone (1000 examples)