Skip to content

Instantly share code, notes, and snippets.

@artemstepanenko
Created June 30, 2017 09:45
Show Gist options
  • Save artemstepanenko/68ce1539633752a9c5368d15d5c59647 to your computer and use it in GitHub Desktop.
Save artemstepanenko/68ce1539633752a9c5368d15d5c59647 to your computer and use it in GitHub Desktop.
Conversion of a Google's timestamp to a formatted date
import moment from 'moment';
const convert = (googleTimestamp, format) => {
return moment(new Date(1899, 12, 30)).add(googleTimestamp, 'd').format(format);
}
export default convert;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment