All files / app/components EpochDateTime.tsx

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24                      9x 13x 13x                 9x  
import React from 'react';
 
import { DateTime } from 'app/components/DateTime';
 
export interface EpochDateTimeProps {
  value: number;
  style?: object;
  displayOptions?: object;
}
 
// numbers for humans have commas
export const EpochDateTime = (props: EpochDateTimeProps): JSX.Element => {
  const dateTime = new Date(props.value * 1000);
  return (
    <DateTime
      value={dateTime}
      style={props.style}
      displayOptions={props.displayOptions}
    />
  );
};
 
EpochDateTime.displayName = 'EpochDateTime';