Skip to content

Instantly share code, notes, and snippets.

@fmtarif
Last active December 31, 2017 12:11
Show Gist options
  • Save fmtarif/2e29ca05568077148333a8db07bd2c9c to your computer and use it in GitHub Desktop.
Save fmtarif/2e29ca05568077148333a8db07bd2c9c to your computer and use it in GitHub Desktop.
start = moment().hour(6).minute(0);
output = [];
for (i=1; i<33; i++) {
from = start.format('h:mm')
to = start.add('30', 'm').format('h:mm');
output.push(`#${i}: ${from}-${to} - `);
}
console.log(output.join("\n"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment