Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 16717 | Rev 16719 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 16717 Rev 16718
Línea 240... Línea 240...
240
      const currentDate = new Date()
240
      const currentDate = new Date()
241
      const selectedDt = new Date(selected.format('YYYY-MM-DD'))
241
      const selectedDt = new Date(selected.format('YYYY-MM-DD'))
242
      const timeDiff = selectedDt.getTime() - currentDate.getTime()
242
      const timeDiff = selectedDt.getTime() - currentDate.getTime()
243
      const daysDiff = Math.ceil(timeDiff / (1000 * 60 * 60 * 24))
243
      const daysDiff = Math.ceil(timeDiff / (1000 * 60 * 60 * 24))
244
      const hoursDiff = Math.floor(
244
      const hoursDiff = Math.floor(
245
        (diferenciaEnTiempo % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)
245
        (timeDiff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)
246
      )
246
      )
247
      const minutesDiff = Math.floor(
247
      const minutesDiff = Math.floor(
248
        (diferenciaEnTiempo % (1000 * 60 * 60)) / (1000 * 60)
248
        (timeDiff % (1000 * 60 * 60)) / (1000 * 60)
249
      )
249
      )
250
      setDaysDifference({
250
      setDaysDifference({
251
        days: daysDiff,
251
        days: daysDiff,
252
        hours: hoursDiff,
252
        hours: hoursDiff,
253
        minutes: minutesDiff
253
        minutes: minutesDiff