import moment from 'moment'
import React from 'react'
import PropTypes from 'prop-types'

function format (value) {
  if (value.isAfter(moment().startOf('year'))) {
    return value.format('MM/DD HH:mm')
  }

  return value.format('YYYY/MM/DD HH:mm')
}

function ReadableTime ({ value }) {
  const parsedValue = moment(value)

  if (!parsedValue.isValid()) {
    return null
  }

  return <time dateTime={value}>{format(parsedValue)}</time>
}

ReadableTime.propTypes = {
  value: PropTypes.string.isRequired
}

export default ReadableTime

@@ -93,16 +93,20 @@
 nction f
+ullF
 ormat (v
@@ -113,16 +113,174 @@
 alue) %7B%0A
+  return value.format('YYYY/MM/DD HH:mm')%0A%7D%0A%0Afunction format (value) %7B%0A  if (value.isAfter(moment().subtract(48, 'hours'))) %7B%0A    return value.fromNow()%0A  %7D%0A%0A
   if (va
@@ -377,39 +377,24 @@
 urn 
-value.format('YYYY/MM/DD HH:mm'
+fullFormat(value
 )%0A%7D%0A
@@ -529,16 +529,22 @@
  return 
+(%0A    
 %3Ctime da
@@ -557,17 +557,56 @@
 =%7Bvalue%7D
-%3E
+ title=%7BfullFormat(parsedValue)%7D%3E%0A      
 %7Bformat(
@@ -622,16 +622,21 @@
 ue)%7D
+%0A    
 %3C/time%3E%0A
 %7D%0A%0AR
@@ -631,16 +631,20 @@
 %3C/time%3E%0A
+  )%0A
 %7D%0A%0AReada

Add full date and time to the cell value titles