client/src/utils.js
author ymh <ymh.work@gmail.com>
Mon, 08 Oct 2018 18:35:47 +0200
changeset 168 ea92f4fe783d
parent 74 043477fd5c5c
permissions -rw-r--r--
- move SlateEditor and dependencies to its own folder - remove Immutable - remove redux-persist-immutable - remobe redux-immutable - update libraries - added tests on store manipulations (accessor and reducers)

import moment from 'moment'

export const defaultDateTimeformat = "YYYY-MM-DDTHH:mm:ss.SSSZ";

export const formatTimestamp = (ts) => {
  return moment(ts).local().format('H:mm:ss');
}

export const now = () => {
  return moment.utc().format(defaultDateTimeformat);
}