Skip to content

Instantly share code, notes, and snippets.

@kenjosling
Created July 8, 2018 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenjosling/f2e16443b57e2b404c0a133e7415affc to your computer and use it in GitHub Desktop.
Save kenjosling/f2e16443b57e2b404c0a133e7415affc to your computer and use it in GitHub Desktop.
var chrono = require('chrono-node');
var dateFormat = require('dateformat');
var date = chrono.parseDate('after july this year').toDateString();
console.log(date); //'Sun Jul 01 2018'
console.log(dateFormat(new Date(date), "isoUtcDateTime")); //'2018-06-30T14:00:00Z'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment