mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-25 01:14:16 +01:00
Update write-date.ps1 and list-weather.ps1
This commit is contained in:
parent
ba0e42470b
commit
7ab84e960d
@ -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++
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user