Function | Shortcut |
---|---|
New Tab | ⌘ + T |
Close Tab or Window | ⌘ + W (same as many mac apps) |
Go to Tab | ⌘ + Number Key (ie: ⌘2 is 2nd tab) |
Go to Split Pane by Direction | ⌘ + Option + Arrow Key |
Cycle iTerm Windows | ⌘ + backtick (true of all mac apps and works with desktops/mission control) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getAge(birthDate, dateToCompare) { | |
const birth = new Date(birthDate); | |
const dateToCheck = dateToCompare ? new Date(dateToCompare) : new Date(); | |
const [initialYear, finalYear] = [birth.getFullYear(), dateToCheck.getFullYear()]; | |
// getting milliseconds passed from birthdate to the date to check | |
const milliseconds = dateToCheck.valueOf() - birth.valueOf(); | |
// returning age by transforming milliseconds => minutes => hours => days => years | |
const age = milliseconds / (1000 * 60 * 60 * 24 * averageDaysPerYear(initialYear, finalYear)); | |
return parseInt(age); |