An npm module that aims to help put into perspective the new phenomenon of time under Trump. Time seems to move both quickly and slowly leading to many questions on Trump's effect on time. Until further research can be done this project aims to compare various trump time units against constant real time.
comeyyatesbannonpriebusspicerflynnscaramucci
trumpTimeUnits(start, end, units)
- @param {
Date|Moment}start- Start date, can be a javascript date object or moment date object - @param {
Date|Moment}end- End date, can be a javascript date object or moment date object - @param {
String}unitsOne of the available units (see above)
trumpTimeUnits(duration, units)
- @param {
Number}duration- The length of time in milliseconds - @param {
String}units- One of the available units (see above)
Use moment as a helper to get things into a usable format
const moment = require('moment');
const trumpTimeUnits = require('trump-time-units');
// using a known duration in milliseconds
const twentyDays = moment.duration(20, 'days').asMilliseconds();
console.log(`20 days is ${trumpTimeUnits(twentyDays, 'scaramucci')} scaramucci's`);
// » 20 days is 2 scaramucci's
// using a start and end date
const start = new Date('2017-01-01');
const end = new Date('2017-07-04');
console.log(
`Between Janauary 1, 2017
and July 4, 2017
is ${trumpTimeUnits(start, end, 'comey')} comey's`
);
// » Between Janauary 1, 2017
// and July 4, 2017
// is 1.6810049487883312 comey's