How many more days of Donald Trump?

Many of my friends on Facebook are looking very closely at Donald Trump, how long it’s been since he took office etc. Some have also started counting the days.

To help them out, I’ve created a simple PowerShell Script. You could add this to your $PROFILE in PowerShell, so each time you fire up your shell you see what’s what.

$Inauguration = New-Object System.DateTime(2017,1,20)
$EndTerm1 = New-Object System.DateTime(2021,1,20)
$EndTerm2 = New-Object System.DateTime(2025,1,20)

Write-Host "Today, on $(Get-Date -f d), we are $(((get-date) - $Inauguration).days) days into Donald's reign. Only $((($EndTerm1) - (get-date)).days) days to go. Or $((($EndTerm2) - (get-date)).days) days, who knows."

The output looks like this:

PS: This works on PowerShell for Mac, too.

Leave a Reply

Your email address will not be published.