Created
October 26, 2022 09:54
-
-
Save doctordns/4b92c9676f1ce8f5e10841d44ec9f312 to your computer and use it in GitHub Desktop.
How Long Until Rishi Is gone
This file contains 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
# Measure-HowLongRishi.ps1 | |
# A script to predecit when Rishi will be gone | |
# He started on Oct 25 2022 | |
$StartDate = 'October 25 2022 10:30' | |
$Start = Get-Date $StartDate -DisplayHint Date | |
"It all started on [$($Start.datetime)]" | |
# When will it end? | |
$TheEnd = $Start.AddMonths(18) # He will be cone in 18 months | |
$EndDate = get-date $theend -displayhint Date | |
"He will be gone by [$($EndDate.datetime)]" | |
# How long has this been going on? | |
$Today = Get-date | |
$HowLong = $Today - $Start | |
"PM for [{0:n2}] days" -f ($HowLong.TotalDays) | |
# Finally, how long to go | |
$HowLongToGo = $TheEND - $Today | |
"We have to wait another [{0:n2}] days" -f ($HowLongToGo.TotalDays) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment