How to use the max function from moment-timezone
Find comprehensive JavaScript moment-timezone.max code examples handpicked from public code repositorys.
GitHub: hammad-air/time-slots
138 139 140 141 142 143 144 145 146 147
const hourSlots = slots .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(),
0
0
0
moment-timezone.tz is the most popular function in moment-timezone (1000 examples)