client/src/utils.js
author ymh <ymh.work@gmail.com>
Wed, 19 Jul 2017 15:57:13 +0200
changeset 119 8ff8e2aee0f9
parent 74 043477fd5c5c
permissions -rw-r--r--
add parameter to filter session and note by updated date. Add pagination on sessions and notes. add read only endpoint at root level to list notes

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);
}