-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathGet-DaysOfWeek.ps1
35 lines (31 loc) · 910 Bytes
/
Get-DaysOfWeek.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
function Get-DaysOfWeek {
<#
.SYNOPSIS
Gets the days of the week
.DESCRIPTION
Gets the days of the week
.PARAMETER Short
Switch that will return the short name of the days of the week
.NOTES
Renamed from Show-DaysOfWeek and incorporated functionality of Show-ShortDaysOfWeek
#>
[CmdletBinding(ConfirmImpact='None')]
[Alias('Show-DaysOfWeek')] #FunctionAlias
[OutputType([string[]])]
param (
[switch] $Short
)
begin {
Write-Verbose -Message "Starting [$($MyInvocation.Mycommand)]"
}
process {
if ($Short -and $PSBoundParameters.ContainsKey('Short')) {
[System.Globalization.DateTimeFormatInfo]::CurrentInfo.AbbreviatedDayNames
} else {
[System.Globalization.DateTimeFormatInfo]::CurrentInfo.DayNames
}
}
end {
Write-Verbose -Message "Ending [$($MyInvocation.Mycommand)]"
}
}