Skip to content

Instantly share code, notes, and snippets.

View PaulSebalu's full-sized avatar
🎯

Paul Sebalu PaulSebalu

🎯
  • Kampala
  • 22:37 (UTC +03:00)
View GitHub Profile
@PaulSebalu
PaulSebalu / getDates.js
Last active November 29, 2022 12:52 — forked from miguelmota/getDates.js
Get times in between two timestamps with JavaScript.
/**
* Made a few tweaks from Miguel's original code to...
* meet my usecase.
*/
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc';
import customParseFormat from 'dayjs/plugin/customParseFormat';
import timezone from 'dayjs/plugin/timezone';
dayjs.extend(utc);
////////////////////////////////////////////////////////////////////////////////
// Create a directory called "pages" next to
// this file, put markdown files in there, and
// then run:
//
// ```
// $ node build.mjs
// ```
//
// Then deploy the "build" directory somewhere.