Skip to content

Instantly share code, notes, and snippets.

@marshallmurphy
Created April 18, 2020 00:08
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 marshallmurphy/0bccf387d7ff38504c786bc06a104357 to your computer and use it in GitHub Desktop.
Save marshallmurphy/0bccf387d7ff38504c786bc06a104357 to your computer and use it in GitHub Desktop.
generateValues = () => {
let days = [];
let nums = [];
Array(7).fill().forEach((i, index) => {
days.push(moment().subtract(index, 'days').format('ddd'));
nums.push(moment().subtract(index, 'days').format('D'));
});
return { days: days.reverse(), nums: nums.reverse() }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment