Update write-date.ps1 and list-weather.ps1

This commit is contained in:
Markus Fleschutz 2022-12-25 21:47:33 +01:00
parent ba0e42470b
commit 7ab84e960d
2 changed files with 7 additions and 3 deletions

View File

@ -95,9 +95,13 @@ try {
if ($Day -eq 0) {
Write-Host -foregroundColor green "TODAY 🌡°C ☂mm 💧 💨km/h ☀UV ☁️ 👁km at $Area ($Region, $Country)"
} elseif ($Day -eq 1) {
Write-Host -foregroundColor green "TOMORROW"
$Date = (Get-Date).AddDays(1)
[string]$Weekday = $Date.DayOfWeek
Write-Host -foregroundColor green "$($Weekday.toUpper())"
} else {
Write-Host -foregroundColor green "Day after tomorrow"
$Date = (Get-Date).AddDays(2)
[string]$Weekday = $Date.DayOfWeek
Write-Host -foregroundColor green "$($Weekday.toUpper())"
}
$Day++
}

View File

@ -5,7 +5,7 @@
This PowerShell script determines and writes the current date.
.EXAMPLE
PS> ./write-date
Sunday, October 17, 2021
📅12/25/2022
.LINK
https://github.com/fleschutz/PowerShell
.NOTES