Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 16720 Rev 16721
Línea 236... Línea 236...
236
  const handleChange = (selected) => {
236
  const handleChange = (selected) => {
237
    setSelectedDate(selected)
237
    setSelectedDate(selected)
Línea 238... Línea 238...
238
 
238
 
239
    if (selected) {
239
    if (selected) {
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 HH:mm'))
242
      const timeDiff = selectedDt.getTime() - currentDate.getTime()
242
      const timeDiff = selectedDt.getTime() - currentDate.getTime()
243
      const daysDiff = Math.floor(timeDiff / (1000 * 60 * 60 * 24))
243
      const daysDiff = Math.floor(timeDiff / (1000 * 60 * 60 * 24))
244
      const hoursDiff = Math.floor((timeDiff / (1000 * 60 * 60)) % 24)
244
      const hoursDiff = Math.floor((timeDiff / (1000 * 60 * 60)) % 24)