Skip to content

Commit 7ab84e9

Browse files
committed
Update write-date.ps1 and list-weather.ps1
1 parent ba0e424 commit 7ab84e9

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

Scripts/list-weather.ps1

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,13 @@ try {
9595
if ($Day -eq 0) {
9696
Write-Host -foregroundColor green "TODAY 🌡°C ☂️mm 💧 💨km/h ☀️UV ☁️ 👁km at $Area ($Region, $Country)"
9797
} elseif ($Day -eq 1) {
98-
Write-Host -foregroundColor green "TOMORROW"
98+
$Date = (Get-Date).AddDays(1)
99+
[string]$Weekday = $Date.DayOfWeek
100+
Write-Host -foregroundColor green "$($Weekday.toUpper())"
99101
} else {
100-
Write-Host -foregroundColor green "Day after tomorrow"
102+
$Date = (Get-Date).AddDays(2)
103+
[string]$Weekday = $Date.DayOfWeek
104+
Write-Host -foregroundColor green "$($Weekday.toUpper())"
101105
}
102106
$Day++
103107
}

Scripts/write-date.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
This PowerShell script determines and writes the current date.
66
.EXAMPLE
77
PS> ./write-date
8-
Sunday, October 17, 2021
8+
📅12/25/2022
99
.LINK
1010
https://github.com/fleschutz/PowerShell
1111
.NOTES

0 commit comments

Comments
 (0)