psDateFunctions.psm1

#Region '.\Public\Get-1stDayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the first day of a specified month and year.
 
.DESCRIPTION
The Get-1stDayOfMonth function calculates and returns the first day of a given month and year as a System.DateTime object. This can be useful for scheduling, planning, and any operations that require the starting date of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-1stDayOfMonth -Month 7 -Year 2024
 
Returns the first day of July 2024 as a System.DateTime object.
 
.EXAMPLE
$firstDay = Get-1stDayOfMonth -Month 12 -Year 2023
Write-Output "The first day of December 2023 is: $firstDay"
 
Calculates the first day of December 2023, assigns it to the variable $firstDay, and prints it.
 
.INPUTS
None. You cannot pipe objects to Get-1stDayOfMonth.
 
.OUTPUTS
System.DateTime
Returns a System.DateTime object representing the first day of the specified month and year.
 
.NOTES
The function checks if the provided month is within the valid range (1-12). An exception is thrown for invalid month values to ensure reliability in date calculations.
 
#>

function Get-1stDayOfMonth {
    [Alias('Get-FirstDayOfMonth')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    if ($Month -lt 1 -or $Month -gt 12) { throw 'Invalid Month'}
    if ($Year -lt 1 -or $Year -gt 9999) { throw 'Invalid Year'}
    return (Get-Date -Year $Year -Month $Month -Day 1).Date
}
#EndRegion '.\Public\Get-1stDayOfMonth.ps1' 47
#Region '.\Public\Get-LastDayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the last day of a specified month and year.
 
.DESCRIPTION
The Get-LastDayOfMonth function calculates and returns the last day of a given month and year as a System.DateTime object. It is particularly useful for end-of-month calculations, billing cycles, and planning monthly tasks or events.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-LastDayOfMonth -Month 7 -Year 2024
 
Returns the last day of July 2024 as a System.DateTime object.
 
.EXAMPLE
$lastDay = Get-LastDayOfMonth -Month 12 -Year 2023
Write-Output "The last day of December 2023 is: $lastDay"
 
Calculates the last day of December 2023, stores it in the variable $lastDay, and prints it out. Useful for end-of-year processing.
 
.INPUTS
None. You cannot pipe objects to Get-LastDayOfMonth.
 
.OUTPUTS
System.DateTime
Returns a System.DateTime object representing the last day of the specified month and year.
 
.NOTES
The function checks if the provided month is within the valid range (1-12). An exception is thrown for invalid month values to ensure reliability in date calculations.
 
#>

function Get-LastDayOfMonth {
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    if ($Month -lt 1 -or $Month -gt 12) { throw 'Invalid Month'}
    if ($Year -lt 1 -or $Year -gt 9999) { throw 'Invalid Year'}
    return (Get-Date -Year $Year -Month ($Month+1) -Day 1).Date.AddDays(-1)
}
#EndRegion '.\Public\Get-LastDayOfMonth.ps1' 46
#Region '.\Public\Get-NthLastWeekdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates and returns the Nth last occurrence of a specific weekday in a given month and year.
 
.DESCRIPTION
The Get-NthLastWeekdayOfMonth function determines the Nth last occurrence of a specified weekday within a particular month and year. It is useful for finding specific weekdays for scheduling events, meetings, or for any scenario where the ordinal position of a weekday within a month is needed.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.PARAMETER Nth
The ordinal instance of the weekday within the month. For example, 1 for the first occurrence, 2 for the second, etc. This parameter is mandatory and must be a positive integer between 1 and 5.
 
.PARAMETER WeekDay
The day of the week to find. This parameter is mandatory and accepts a [System.DayOfWeek] enum value (e.g., 'Sunday', 'Monday', 'Tuesday', etc.).
 
.EXAMPLE
Get-NthLastWeekdayOfMonth -Month 3 -Year 2024 -Nth 2 -WeekDay 'Tuesday'
 
Returns the second last Tuesday of March 2024 as a System.DateTime object.
 
.EXAMPLE
$meetingDay = Get-NthLastWeekdayOfMonth -Month 10 -Year 2023 -Nth 1 -WeekDay 'Monday'
Write-Output "The last Monday of October 2023 is on: $meetingDay"
 
Calculates the last Monday of October 2023, assigns it to the variable $meetingDay, and prints it.
 
.INPUTS
None. You cannot pipe objects to Get-NthLastWeekdayOfMonth.
 
.OUTPUTS
System.DateTime
Returns a System.DateTime object representing the Nth occurrence of the specified weekday in the given month and year.
 
.NOTES
- Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
- The function will throw an exception if the calculated date does not exist within the specified month, e.g., seeking the 5th last occurrence of a day that only occurs 4 times in that month.
- The function will throw an exception of the Nth parameter is outside the range 1 to 5.
 
#>

function Get-NthLastWeekdayOfMonth {
    [CmdletBinding()]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year,
        [Parameter(Mandatory)][int]$Nth,
        [Parameter(Mandatory)][System.DayOfWeek]$WeekDay
    )

    if ($Month -lt 1 -or $Month -gt 12) { throw 'Invalid Month'}
    if ($Year -lt 1 -or $Year -gt 9999) { throw 'Invalid Year'}
    if ($Nth -lt 1 -or $Nth -gt 5) { throw 'Invalid Nth, must be between 1 and 5' }

    $lastDayOfMonth = Get-LastDayOfMonth -Year $Year -Month $Month

    $result =  $lastDayOfMonth.AddDays(
        (
            ([System.DayOfWeek]::$WeekDay - $lastDayOfMonth.DayOfWeek -7 ) % -7
        ) - 7 * ($Nth -1)
    )

    if ($result.Month -ne $Month) { throw 'That day does not exist'}

    return $result
}
#EndRegion '.\Public\Get-NthLastWeekdayOfMonth.ps1' 70
#Region '.\Public\Get-NthWeekdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates and returns the Nth occurrence of a specific weekday in a given month and year.
 
.DESCRIPTION
The Get-NthWeekdayOfMonth function determines the Nth occurrence of a specified weekday within a particular month and year. It is useful for finding specific weekdays for scheduling events, meetings, or for any scenario where the ordinal position of a weekday within a month is needed.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.PARAMETER Nth
The ordinal instance of the weekday within the month. For example, 1 for the first occurrence, 2 for the second, etc. This parameter is mandatory and must be a positive integer between 1 and 5.
 
.PARAMETER WeekDay
The day of the week to find. This parameter is mandatory and accepts a [System.DayOfWeek] enum value (e.g., 'Sunday', 'Monday', 'Tuesday', etc.).
 
.EXAMPLE
Get-NthWeekdayOfMonth -Month 3 -Year 2024 -Nth 2 -WeekDay 'Tuesday'
 
Returns the second Tuesday of March 2024 as a System.DateTime object.
 
.EXAMPLE
$meetingDay = Get-NthWeekdayOfMonth -Month 10 -Year 2023 -Nth 1 -WeekDay 'Monday'
Write-Output "The first Monday of October 2023 is on: $meetingDay"
 
Calculates the first Monday of October 2023, assigns it to the variable $meetingDay, and prints it.
 
.INPUTS
None. You cannot pipe objects to Get-NthWeekdayOfMonth.
 
.OUTPUTS
System.DateTime
Returns a System.DateTime object representing the Nth occurrence of the specified weekday in the given month and year.
 
.NOTES
- Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
- The function will throw an exception if the calculated date does not exist within the specified month, e.g., seeking the 5th occurrence of a day that only occurs 4 times in that month.
- The function will throw an exception of the Nth parameter is outside the range 1 to 5.
 
#>

function Get-NthWeekdayOfMonth {
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year,
        [Parameter(Mandatory)][int]$Nth,
        [Parameter(Mandatory)][System.DayOfWeek]$WeekDay
    )

    if ($Month -lt 1 -or $Month -gt 12) { throw 'Invalid Month'}
    if ($Year -lt 1 -or $Year -gt 9999) { throw 'Invalid Year'}
    if ($Nth -lt 1 -or $Nth -gt 5) { throw 'Invalid Nth, must be between 1 and 5' }

    $firstDayOfMonth = Get-1stDayOfMonth -Year $Year -Month $Month

    $result =  $firstDayOfMonth.AddDays(
        (
            (7 + [System.DayOfWeek]::$WeekDay - $firstDayOfMonth.DayOfWeek) % 7
        ) + 7 * ($Nth -1)
    )

    if ($result.Month -ne $Month) { throw 'That day does not exist'}

    return $result
}
#EndRegion '.\Public\Get-NthWeekdayOfMonth.ps1' 69
#Region '.\Generated\Get-1stFridayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 1st Friday of a specified month and year.
 
.DESCRIPTION
The Get-1stFridayOfMonth function calculates the date of the 1st Friday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 1st Friday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-1stFridayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 1st Friday of September 2024.
 
.EXAMPLE
$day = Get-1stFridayOfMonth -Month 12 -Year 2023
Write-Output "The 1st Friday of December 2023 is on: $day"
 
Calculates the 1st Friday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-1stFridayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 1st Friday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 1st Friday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-1stFridayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Friday -Nth 1
}
#EndRegion '.\Generated\Get-1stFridayOfMonth.ps1' 45
#Region '.\Generated\Get-1stMondayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 1st Monday of a specified month and year.
 
.DESCRIPTION
The Get-1stMondayOfMonth function calculates the date of the 1st Monday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 1st Monday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-1stMondayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 1st Monday of September 2024.
 
.EXAMPLE
$day = Get-1stMondayOfMonth -Month 12 -Year 2023
Write-Output "The 1st Monday of December 2023 is on: $day"
 
Calculates the 1st Monday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-1stMondayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 1st Monday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 1st Monday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-1stMondayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Monday -Nth 1
}
#EndRegion '.\Generated\Get-1stMondayOfMonth.ps1' 45
#Region '.\Generated\Get-1stSaturdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 1st Saturday of a specified month and year.
 
.DESCRIPTION
The Get-1stSaturdayOfMonth function calculates the date of the 1st Saturday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 1st Saturday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-1stSaturdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 1st Saturday of September 2024.
 
.EXAMPLE
$day = Get-1stSaturdayOfMonth -Month 12 -Year 2023
Write-Output "The 1st Saturday of December 2023 is on: $day"
 
Calculates the 1st Saturday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-1stSaturdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 1st Saturday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 1st Saturday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-1stSaturdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Saturday -Nth 1
}
#EndRegion '.\Generated\Get-1stSaturdayOfMonth.ps1' 45
#Region '.\Generated\Get-1stSundayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 1st Sunday of a specified month and year.
 
.DESCRIPTION
The Get-1stSundayOfMonth function calculates the date of the 1st Sunday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 1st Sunday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-1stSundayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 1st Sunday of September 2024.
 
.EXAMPLE
$day = Get-1stSundayOfMonth -Month 12 -Year 2023
Write-Output "The 1st Sunday of December 2023 is on: $day"
 
Calculates the 1st Sunday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-1stSundayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 1st Sunday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 1st Sunday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-1stSundayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Sunday -Nth 1
}
#EndRegion '.\Generated\Get-1stSundayOfMonth.ps1' 45
#Region '.\Generated\Get-1stThursdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 1st Thursday of a specified month and year.
 
.DESCRIPTION
The Get-1stThursdayOfMonth function calculates the date of the 1st Thursday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 1st Thursday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-1stThursdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 1st Thursday of September 2024.
 
.EXAMPLE
$day = Get-1stThursdayOfMonth -Month 12 -Year 2023
Write-Output "The 1st Thursday of December 2023 is on: $day"
 
Calculates the 1st Thursday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-1stThursdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 1st Thursday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 1st Thursday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-1stThursdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Thursday -Nth 1
}
#EndRegion '.\Generated\Get-1stThursdayOfMonth.ps1' 45
#Region '.\Generated\Get-1stTuesdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 1st Tuesday of a specified month and year.
 
.DESCRIPTION
The Get-1stTuesdayOfMonth function calculates the date of the 1st Tuesday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 1st Tuesday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-1stTuesdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 1st Tuesday of September 2024.
 
.EXAMPLE
$day = Get-1stTuesdayOfMonth -Month 12 -Year 2023
Write-Output "The 1st Tuesday of December 2023 is on: $day"
 
Calculates the 1st Tuesday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-1stTuesdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 1st Tuesday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 1st Tuesday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-1stTuesdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Tuesday -Nth 1
}
#EndRegion '.\Generated\Get-1stTuesdayOfMonth.ps1' 45
#Region '.\Generated\Get-1stWednesdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 1st Wednesday of a specified month and year.
 
.DESCRIPTION
The Get-1stWednesdayOfMonth function calculates the date of the 1st Wednesday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 1st Wednesday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-1stWednesdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 1st Wednesday of September 2024.
 
.EXAMPLE
$day = Get-1stWednesdayOfMonth -Month 12 -Year 2023
Write-Output "The 1st Wednesday of December 2023 is on: $day"
 
Calculates the 1st Wednesday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-1stWednesdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 1st Wednesday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 1st Wednesday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-1stWednesdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Wednesday -Nth 1
}
#EndRegion '.\Generated\Get-1stWednesdayOfMonth.ps1' 45
#Region '.\Generated\Get-2ndFridayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 2nd Friday of a specified month and year.
 
.DESCRIPTION
The Get-2ndFridayOfMonth function calculates the date of the 2nd Friday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 2nd Friday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-2ndFridayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 2nd Friday of September 2024.
 
.EXAMPLE
$day = Get-2ndFridayOfMonth -Month 12 -Year 2023
Write-Output "The 2nd Friday of December 2023 is on: $day"
 
Calculates the 2nd Friday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-2ndFridayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 2nd Friday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 2nd Friday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-2ndFridayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Friday -Nth 2
}
#EndRegion '.\Generated\Get-2ndFridayOfMonth.ps1' 45
#Region '.\Generated\Get-2ndLastFridayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 2nd Last Friday of a specified month and year.
 
.DESCRIPTION
The Get-2ndLastFridayOfMonth function calculates the date of the 2nd Last Friday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 2nd Last Friday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-2ndLastFridayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 2nd Last Friday of September 2024.
 
.EXAMPLE
$day = Get-2ndLastFridayOfMonth -Month 12 -Year 2023
Write-Output "The 2nd Last Friday of December 2023 is on: $day"
 
Calculates the 2nd Last Friday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-2ndLastFridayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 2nd Last Friday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 2nd Last Friday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-2ndLastFridayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Friday -Nth 2
}
#EndRegion '.\Generated\Get-2ndLastFridayOfMonth.ps1' 45
#Region '.\Generated\Get-2ndLastMondayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 2nd Last Monday of a specified month and year.
 
.DESCRIPTION
The Get-2ndLastMondayOfMonth function calculates the date of the 2nd Last Monday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 2nd Last Monday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-2ndLastMondayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 2nd Last Monday of September 2024.
 
.EXAMPLE
$day = Get-2ndLastMondayOfMonth -Month 12 -Year 2023
Write-Output "The 2nd Last Monday of December 2023 is on: $day"
 
Calculates the 2nd Last Monday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-2ndLastMondayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 2nd Last Monday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 2nd Last Monday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-2ndLastMondayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Monday -Nth 2
}
#EndRegion '.\Generated\Get-2ndLastMondayOfMonth.ps1' 45
#Region '.\Generated\Get-2ndLastSaturdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 2nd Last Saturday of a specified month and year.
 
.DESCRIPTION
The Get-2ndLastSaturdayOfMonth function calculates the date of the 2nd Last Saturday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 2nd Last Saturday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-2ndLastSaturdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 2nd Last Saturday of September 2024.
 
.EXAMPLE
$day = Get-2ndLastSaturdayOfMonth -Month 12 -Year 2023
Write-Output "The 2nd Last Saturday of December 2023 is on: $day"
 
Calculates the 2nd Last Saturday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-2ndLastSaturdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 2nd Last Saturday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 2nd Last Saturday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-2ndLastSaturdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Saturday -Nth 2
}
#EndRegion '.\Generated\Get-2ndLastSaturdayOfMonth.ps1' 45
#Region '.\Generated\Get-2ndLastSundayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 2nd Last Sunday of a specified month and year.
 
.DESCRIPTION
The Get-2ndLastSundayOfMonth function calculates the date of the 2nd Last Sunday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 2nd Last Sunday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-2ndLastSundayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 2nd Last Sunday of September 2024.
 
.EXAMPLE
$day = Get-2ndLastSundayOfMonth -Month 12 -Year 2023
Write-Output "The 2nd Last Sunday of December 2023 is on: $day"
 
Calculates the 2nd Last Sunday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-2ndLastSundayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 2nd Last Sunday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 2nd Last Sunday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-2ndLastSundayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Sunday -Nth 2
}
#EndRegion '.\Generated\Get-2ndLastSundayOfMonth.ps1' 45
#Region '.\Generated\Get-2ndLastThursdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 2nd Last Thursday of a specified month and year.
 
.DESCRIPTION
The Get-2ndLastThursdayOfMonth function calculates the date of the 2nd Last Thursday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 2nd Last Thursday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-2ndLastThursdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 2nd Last Thursday of September 2024.
 
.EXAMPLE
$day = Get-2ndLastThursdayOfMonth -Month 12 -Year 2023
Write-Output "The 2nd Last Thursday of December 2023 is on: $day"
 
Calculates the 2nd Last Thursday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-2ndLastThursdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 2nd Last Thursday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 2nd Last Thursday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-2ndLastThursdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Thursday -Nth 2
}
#EndRegion '.\Generated\Get-2ndLastThursdayOfMonth.ps1' 45
#Region '.\Generated\Get-2ndLastTuesdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 2nd Last Tuesday of a specified month and year.
 
.DESCRIPTION
The Get-2ndLastTuesdayOfMonth function calculates the date of the 2nd Last Tuesday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 2nd Last Tuesday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-2ndLastTuesdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 2nd Last Tuesday of September 2024.
 
.EXAMPLE
$day = Get-2ndLastTuesdayOfMonth -Month 12 -Year 2023
Write-Output "The 2nd Last Tuesday of December 2023 is on: $day"
 
Calculates the 2nd Last Tuesday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-2ndLastTuesdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 2nd Last Tuesday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 2nd Last Tuesday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-2ndLastTuesdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Tuesday -Nth 2
}
#EndRegion '.\Generated\Get-2ndLastTuesdayOfMonth.ps1' 45
#Region '.\Generated\Get-2ndLastWednesdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 2nd Last Wednesday of a specified month and year.
 
.DESCRIPTION
The Get-2ndLastWednesdayOfMonth function calculates the date of the 2nd Last Wednesday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 2nd Last Wednesday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-2ndLastWednesdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 2nd Last Wednesday of September 2024.
 
.EXAMPLE
$day = Get-2ndLastWednesdayOfMonth -Month 12 -Year 2023
Write-Output "The 2nd Last Wednesday of December 2023 is on: $day"
 
Calculates the 2nd Last Wednesday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-2ndLastWednesdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 2nd Last Wednesday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 2nd Last Wednesday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-2ndLastWednesdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Wednesday -Nth 2
}
#EndRegion '.\Generated\Get-2ndLastWednesdayOfMonth.ps1' 45
#Region '.\Generated\Get-2ndMondayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 2nd Monday of a specified month and year.
 
.DESCRIPTION
The Get-2ndMondayOfMonth function calculates the date of the 2nd Monday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 2nd Monday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-2ndMondayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 2nd Monday of September 2024.
 
.EXAMPLE
$day = Get-2ndMondayOfMonth -Month 12 -Year 2023
Write-Output "The 2nd Monday of December 2023 is on: $day"
 
Calculates the 2nd Monday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-2ndMondayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 2nd Monday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 2nd Monday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-2ndMondayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Monday -Nth 2
}
#EndRegion '.\Generated\Get-2ndMondayOfMonth.ps1' 45
#Region '.\Generated\Get-2ndSaturdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 2nd Saturday of a specified month and year.
 
.DESCRIPTION
The Get-2ndSaturdayOfMonth function calculates the date of the 2nd Saturday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 2nd Saturday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-2ndSaturdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 2nd Saturday of September 2024.
 
.EXAMPLE
$day = Get-2ndSaturdayOfMonth -Month 12 -Year 2023
Write-Output "The 2nd Saturday of December 2023 is on: $day"
 
Calculates the 2nd Saturday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-2ndSaturdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 2nd Saturday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 2nd Saturday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-2ndSaturdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Saturday -Nth 2
}
#EndRegion '.\Generated\Get-2ndSaturdayOfMonth.ps1' 45
#Region '.\Generated\Get-2ndSundayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 2nd Sunday of a specified month and year.
 
.DESCRIPTION
The Get-2ndSundayOfMonth function calculates the date of the 2nd Sunday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 2nd Sunday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-2ndSundayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 2nd Sunday of September 2024.
 
.EXAMPLE
$day = Get-2ndSundayOfMonth -Month 12 -Year 2023
Write-Output "The 2nd Sunday of December 2023 is on: $day"
 
Calculates the 2nd Sunday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-2ndSundayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 2nd Sunday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 2nd Sunday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-2ndSundayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Sunday -Nth 2
}
#EndRegion '.\Generated\Get-2ndSundayOfMonth.ps1' 45
#Region '.\Generated\Get-2ndThursdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 2nd Thursday of a specified month and year.
 
.DESCRIPTION
The Get-2ndThursdayOfMonth function calculates the date of the 2nd Thursday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 2nd Thursday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-2ndThursdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 2nd Thursday of September 2024.
 
.EXAMPLE
$day = Get-2ndThursdayOfMonth -Month 12 -Year 2023
Write-Output "The 2nd Thursday of December 2023 is on: $day"
 
Calculates the 2nd Thursday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-2ndThursdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 2nd Thursday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 2nd Thursday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-2ndThursdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Thursday -Nth 2
}
#EndRegion '.\Generated\Get-2ndThursdayOfMonth.ps1' 45
#Region '.\Generated\Get-2ndTuesdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 2nd Tuesday of a specified month and year.
 
.DESCRIPTION
The Get-2ndTuesdayOfMonth function calculates the date of the 2nd Tuesday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 2nd Tuesday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-2ndTuesdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 2nd Tuesday of September 2024.
 
.EXAMPLE
$day = Get-2ndTuesdayOfMonth -Month 12 -Year 2023
Write-Output "The 2nd Tuesday of December 2023 is on: $day"
 
Calculates the 2nd Tuesday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-2ndTuesdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 2nd Tuesday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 2nd Tuesday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-2ndTuesdayOfMonth {
    [Alias('Get-PatchTuesday')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Tuesday -Nth 2
}
#EndRegion '.\Generated\Get-2ndTuesdayOfMonth.ps1' 45
#Region '.\Generated\Get-2ndWednesdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 2nd Wednesday of a specified month and year.
 
.DESCRIPTION
The Get-2ndWednesdayOfMonth function calculates the date of the 2nd Wednesday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 2nd Wednesday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-2ndWednesdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 2nd Wednesday of September 2024.
 
.EXAMPLE
$day = Get-2ndWednesdayOfMonth -Month 12 -Year 2023
Write-Output "The 2nd Wednesday of December 2023 is on: $day"
 
Calculates the 2nd Wednesday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-2ndWednesdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 2nd Wednesday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 2nd Wednesday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-2ndWednesdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Wednesday -Nth 2
}
#EndRegion '.\Generated\Get-2ndWednesdayOfMonth.ps1' 45
#Region '.\Generated\Get-3rdFridayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 3rd Friday of a specified month and year.
 
.DESCRIPTION
The Get-3rdFridayOfMonth function calculates the date of the 3rd Friday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 3rd Friday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-3rdFridayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 3rd Friday of September 2024.
 
.EXAMPLE
$day = Get-3rdFridayOfMonth -Month 12 -Year 2023
Write-Output "The 3rd Friday of December 2023 is on: $day"
 
Calculates the 3rd Friday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-3rdFridayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 3rd Friday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 3rd Friday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-3rdFridayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Friday -Nth 3
}
#EndRegion '.\Generated\Get-3rdFridayOfMonth.ps1' 45
#Region '.\Generated\Get-3rdLastFridayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 3rd Last Friday of a specified month and year.
 
.DESCRIPTION
The Get-3rdLastFridayOfMonth function calculates the date of the 3rd Last Friday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 3rd Last Friday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-3rdLastFridayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 3rd Last Friday of September 2024.
 
.EXAMPLE
$day = Get-3rdLastFridayOfMonth -Month 12 -Year 2023
Write-Output "The 3rd Last Friday of December 2023 is on: $day"
 
Calculates the 3rd Last Friday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-3rdLastFridayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 3rd Last Friday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 3rd Last Friday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-3rdLastFridayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Friday -Nth 3
}
#EndRegion '.\Generated\Get-3rdLastFridayOfMonth.ps1' 45
#Region '.\Generated\Get-3rdLastMondayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 3rd Last Monday of a specified month and year.
 
.DESCRIPTION
The Get-3rdLastMondayOfMonth function calculates the date of the 3rd Last Monday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 3rd Last Monday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-3rdLastMondayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 3rd Last Monday of September 2024.
 
.EXAMPLE
$day = Get-3rdLastMondayOfMonth -Month 12 -Year 2023
Write-Output "The 3rd Last Monday of December 2023 is on: $day"
 
Calculates the 3rd Last Monday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-3rdLastMondayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 3rd Last Monday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 3rd Last Monday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-3rdLastMondayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Monday -Nth 3
}
#EndRegion '.\Generated\Get-3rdLastMondayOfMonth.ps1' 45
#Region '.\Generated\Get-3rdLastSaturdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 3rd Last Saturday of a specified month and year.
 
.DESCRIPTION
The Get-3rdLastSaturdayOfMonth function calculates the date of the 3rd Last Saturday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 3rd Last Saturday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-3rdLastSaturdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 3rd Last Saturday of September 2024.
 
.EXAMPLE
$day = Get-3rdLastSaturdayOfMonth -Month 12 -Year 2023
Write-Output "The 3rd Last Saturday of December 2023 is on: $day"
 
Calculates the 3rd Last Saturday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-3rdLastSaturdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 3rd Last Saturday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 3rd Last Saturday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-3rdLastSaturdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Saturday -Nth 3
}
#EndRegion '.\Generated\Get-3rdLastSaturdayOfMonth.ps1' 45
#Region '.\Generated\Get-3rdLastSundayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 3rd Last Sunday of a specified month and year.
 
.DESCRIPTION
The Get-3rdLastSundayOfMonth function calculates the date of the 3rd Last Sunday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 3rd Last Sunday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-3rdLastSundayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 3rd Last Sunday of September 2024.
 
.EXAMPLE
$day = Get-3rdLastSundayOfMonth -Month 12 -Year 2023
Write-Output "The 3rd Last Sunday of December 2023 is on: $day"
 
Calculates the 3rd Last Sunday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-3rdLastSundayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 3rd Last Sunday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 3rd Last Sunday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-3rdLastSundayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Sunday -Nth 3
}
#EndRegion '.\Generated\Get-3rdLastSundayOfMonth.ps1' 45
#Region '.\Generated\Get-3rdLastThursdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 3rd Last Thursday of a specified month and year.
 
.DESCRIPTION
The Get-3rdLastThursdayOfMonth function calculates the date of the 3rd Last Thursday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 3rd Last Thursday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-3rdLastThursdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 3rd Last Thursday of September 2024.
 
.EXAMPLE
$day = Get-3rdLastThursdayOfMonth -Month 12 -Year 2023
Write-Output "The 3rd Last Thursday of December 2023 is on: $day"
 
Calculates the 3rd Last Thursday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-3rdLastThursdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 3rd Last Thursday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 3rd Last Thursday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-3rdLastThursdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Thursday -Nth 3
}
#EndRegion '.\Generated\Get-3rdLastThursdayOfMonth.ps1' 45
#Region '.\Generated\Get-3rdLastTuesdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 3rd Last Tuesday of a specified month and year.
 
.DESCRIPTION
The Get-3rdLastTuesdayOfMonth function calculates the date of the 3rd Last Tuesday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 3rd Last Tuesday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-3rdLastTuesdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 3rd Last Tuesday of September 2024.
 
.EXAMPLE
$day = Get-3rdLastTuesdayOfMonth -Month 12 -Year 2023
Write-Output "The 3rd Last Tuesday of December 2023 is on: $day"
 
Calculates the 3rd Last Tuesday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-3rdLastTuesdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 3rd Last Tuesday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 3rd Last Tuesday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-3rdLastTuesdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Tuesday -Nth 3
}
#EndRegion '.\Generated\Get-3rdLastTuesdayOfMonth.ps1' 45
#Region '.\Generated\Get-3rdLastWednesdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 3rd Last Wednesday of a specified month and year.
 
.DESCRIPTION
The Get-3rdLastWednesdayOfMonth function calculates the date of the 3rd Last Wednesday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 3rd Last Wednesday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-3rdLastWednesdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 3rd Last Wednesday of September 2024.
 
.EXAMPLE
$day = Get-3rdLastWednesdayOfMonth -Month 12 -Year 2023
Write-Output "The 3rd Last Wednesday of December 2023 is on: $day"
 
Calculates the 3rd Last Wednesday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-3rdLastWednesdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 3rd Last Wednesday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 3rd Last Wednesday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-3rdLastWednesdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Wednesday -Nth 3
}
#EndRegion '.\Generated\Get-3rdLastWednesdayOfMonth.ps1' 45
#Region '.\Generated\Get-3rdMondayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 3rd Monday of a specified month and year.
 
.DESCRIPTION
The Get-3rdMondayOfMonth function calculates the date of the 3rd Monday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 3rd Monday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-3rdMondayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 3rd Monday of September 2024.
 
.EXAMPLE
$day = Get-3rdMondayOfMonth -Month 12 -Year 2023
Write-Output "The 3rd Monday of December 2023 is on: $day"
 
Calculates the 3rd Monday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-3rdMondayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 3rd Monday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 3rd Monday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-3rdMondayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Monday -Nth 3
}
#EndRegion '.\Generated\Get-3rdMondayOfMonth.ps1' 45
#Region '.\Generated\Get-3rdSaturdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 3rd Saturday of a specified month and year.
 
.DESCRIPTION
The Get-3rdSaturdayOfMonth function calculates the date of the 3rd Saturday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 3rd Saturday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-3rdSaturdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 3rd Saturday of September 2024.
 
.EXAMPLE
$day = Get-3rdSaturdayOfMonth -Month 12 -Year 2023
Write-Output "The 3rd Saturday of December 2023 is on: $day"
 
Calculates the 3rd Saturday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-3rdSaturdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 3rd Saturday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 3rd Saturday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-3rdSaturdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Saturday -Nth 3
}
#EndRegion '.\Generated\Get-3rdSaturdayOfMonth.ps1' 45
#Region '.\Generated\Get-3rdSundayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 3rd Sunday of a specified month and year.
 
.DESCRIPTION
The Get-3rdSundayOfMonth function calculates the date of the 3rd Sunday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 3rd Sunday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-3rdSundayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 3rd Sunday of September 2024.
 
.EXAMPLE
$day = Get-3rdSundayOfMonth -Month 12 -Year 2023
Write-Output "The 3rd Sunday of December 2023 is on: $day"
 
Calculates the 3rd Sunday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-3rdSundayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 3rd Sunday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 3rd Sunday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-3rdSundayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Sunday -Nth 3
}
#EndRegion '.\Generated\Get-3rdSundayOfMonth.ps1' 45
#Region '.\Generated\Get-3rdThursdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 3rd Thursday of a specified month and year.
 
.DESCRIPTION
The Get-3rdThursdayOfMonth function calculates the date of the 3rd Thursday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 3rd Thursday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-3rdThursdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 3rd Thursday of September 2024.
 
.EXAMPLE
$day = Get-3rdThursdayOfMonth -Month 12 -Year 2023
Write-Output "The 3rd Thursday of December 2023 is on: $day"
 
Calculates the 3rd Thursday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-3rdThursdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 3rd Thursday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 3rd Thursday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-3rdThursdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Thursday -Nth 3
}
#EndRegion '.\Generated\Get-3rdThursdayOfMonth.ps1' 45
#Region '.\Generated\Get-3rdTuesdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 3rd Tuesday of a specified month and year.
 
.DESCRIPTION
The Get-3rdTuesdayOfMonth function calculates the date of the 3rd Tuesday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 3rd Tuesday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-3rdTuesdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 3rd Tuesday of September 2024.
 
.EXAMPLE
$day = Get-3rdTuesdayOfMonth -Month 12 -Year 2023
Write-Output "The 3rd Tuesday of December 2023 is on: $day"
 
Calculates the 3rd Tuesday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-3rdTuesdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 3rd Tuesday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 3rd Tuesday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-3rdTuesdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Tuesday -Nth 3
}
#EndRegion '.\Generated\Get-3rdTuesdayOfMonth.ps1' 45
#Region '.\Generated\Get-3rdWednesdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 3rd Wednesday of a specified month and year.
 
.DESCRIPTION
The Get-3rdWednesdayOfMonth function calculates the date of the 3rd Wednesday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 3rd Wednesday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-3rdWednesdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 3rd Wednesday of September 2024.
 
.EXAMPLE
$day = Get-3rdWednesdayOfMonth -Month 12 -Year 2023
Write-Output "The 3rd Wednesday of December 2023 is on: $day"
 
Calculates the 3rd Wednesday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-3rdWednesdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 3rd Wednesday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 3rd Wednesday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-3rdWednesdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Wednesday -Nth 3
}
#EndRegion '.\Generated\Get-3rdWednesdayOfMonth.ps1' 45
#Region '.\Generated\Get-4thFridayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 4th Friday of a specified month and year.
 
.DESCRIPTION
The Get-4thFridayOfMonth function calculates the date of the 4th Friday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 4th Friday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-4thFridayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 4th Friday of September 2024.
 
.EXAMPLE
$day = Get-4thFridayOfMonth -Month 12 -Year 2023
Write-Output "The 4th Friday of December 2023 is on: $day"
 
Calculates the 4th Friday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-4thFridayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 4th Friday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 4th Friday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-4thFridayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Friday -Nth 4
}
#EndRegion '.\Generated\Get-4thFridayOfMonth.ps1' 45
#Region '.\Generated\Get-4thLastFridayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 4th Last Friday of a specified month and year.
 
.DESCRIPTION
The Get-4thLastFridayOfMonth function calculates the date of the 4th Last Friday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 4th Last Friday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-4thLastFridayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 4th Last Friday of September 2024.
 
.EXAMPLE
$day = Get-4thLastFridayOfMonth -Month 12 -Year 2023
Write-Output "The 4th Last Friday of December 2023 is on: $day"
 
Calculates the 4th Last Friday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-4thLastFridayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 4th Last Friday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 4th Last Friday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-4thLastFridayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Friday -Nth 4
}
#EndRegion '.\Generated\Get-4thLastFridayOfMonth.ps1' 45
#Region '.\Generated\Get-4thLastMondayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 4th Last Monday of a specified month and year.
 
.DESCRIPTION
The Get-4thLastMondayOfMonth function calculates the date of the 4th Last Monday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 4th Last Monday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-4thLastMondayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 4th Last Monday of September 2024.
 
.EXAMPLE
$day = Get-4thLastMondayOfMonth -Month 12 -Year 2023
Write-Output "The 4th Last Monday of December 2023 is on: $day"
 
Calculates the 4th Last Monday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-4thLastMondayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 4th Last Monday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 4th Last Monday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-4thLastMondayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Monday -Nth 4
}
#EndRegion '.\Generated\Get-4thLastMondayOfMonth.ps1' 45
#Region '.\Generated\Get-4thLastSaturdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 4th Last Saturday of a specified month and year.
 
.DESCRIPTION
The Get-4thLastSaturdayOfMonth function calculates the date of the 4th Last Saturday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 4th Last Saturday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-4thLastSaturdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 4th Last Saturday of September 2024.
 
.EXAMPLE
$day = Get-4thLastSaturdayOfMonth -Month 12 -Year 2023
Write-Output "The 4th Last Saturday of December 2023 is on: $day"
 
Calculates the 4th Last Saturday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-4thLastSaturdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 4th Last Saturday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 4th Last Saturday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-4thLastSaturdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Saturday -Nth 4
}
#EndRegion '.\Generated\Get-4thLastSaturdayOfMonth.ps1' 45
#Region '.\Generated\Get-4thLastSundayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 4th Last Sunday of a specified month and year.
 
.DESCRIPTION
The Get-4thLastSundayOfMonth function calculates the date of the 4th Last Sunday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 4th Last Sunday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-4thLastSundayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 4th Last Sunday of September 2024.
 
.EXAMPLE
$day = Get-4thLastSundayOfMonth -Month 12 -Year 2023
Write-Output "The 4th Last Sunday of December 2023 is on: $day"
 
Calculates the 4th Last Sunday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-4thLastSundayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 4th Last Sunday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 4th Last Sunday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-4thLastSundayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Sunday -Nth 4
}
#EndRegion '.\Generated\Get-4thLastSundayOfMonth.ps1' 45
#Region '.\Generated\Get-4thLastThursdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 4th Last Thursday of a specified month and year.
 
.DESCRIPTION
The Get-4thLastThursdayOfMonth function calculates the date of the 4th Last Thursday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 4th Last Thursday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-4thLastThursdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 4th Last Thursday of September 2024.
 
.EXAMPLE
$day = Get-4thLastThursdayOfMonth -Month 12 -Year 2023
Write-Output "The 4th Last Thursday of December 2023 is on: $day"
 
Calculates the 4th Last Thursday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-4thLastThursdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 4th Last Thursday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 4th Last Thursday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-4thLastThursdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Thursday -Nth 4
}
#EndRegion '.\Generated\Get-4thLastThursdayOfMonth.ps1' 45
#Region '.\Generated\Get-4thLastTuesdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 4th Last Tuesday of a specified month and year.
 
.DESCRIPTION
The Get-4thLastTuesdayOfMonth function calculates the date of the 4th Last Tuesday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 4th Last Tuesday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-4thLastTuesdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 4th Last Tuesday of September 2024.
 
.EXAMPLE
$day = Get-4thLastTuesdayOfMonth -Month 12 -Year 2023
Write-Output "The 4th Last Tuesday of December 2023 is on: $day"
 
Calculates the 4th Last Tuesday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-4thLastTuesdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 4th Last Tuesday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 4th Last Tuesday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-4thLastTuesdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Tuesday -Nth 4
}
#EndRegion '.\Generated\Get-4thLastTuesdayOfMonth.ps1' 45
#Region '.\Generated\Get-4thLastWednesdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 4th Last Wednesday of a specified month and year.
 
.DESCRIPTION
The Get-4thLastWednesdayOfMonth function calculates the date of the 4th Last Wednesday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 4th Last Wednesday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-4thLastWednesdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 4th Last Wednesday of September 2024.
 
.EXAMPLE
$day = Get-4thLastWednesdayOfMonth -Month 12 -Year 2023
Write-Output "The 4th Last Wednesday of December 2023 is on: $day"
 
Calculates the 4th Last Wednesday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-4thLastWednesdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 4th Last Wednesday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 4th Last Wednesday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-4thLastWednesdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Wednesday -Nth 4
}
#EndRegion '.\Generated\Get-4thLastWednesdayOfMonth.ps1' 45
#Region '.\Generated\Get-4thMondayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 4th Monday of a specified month and year.
 
.DESCRIPTION
The Get-4thMondayOfMonth function calculates the date of the 4th Monday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 4th Monday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-4thMondayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 4th Monday of September 2024.
 
.EXAMPLE
$day = Get-4thMondayOfMonth -Month 12 -Year 2023
Write-Output "The 4th Monday of December 2023 is on: $day"
 
Calculates the 4th Monday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-4thMondayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 4th Monday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 4th Monday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-4thMondayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Monday -Nth 4
}
#EndRegion '.\Generated\Get-4thMondayOfMonth.ps1' 45
#Region '.\Generated\Get-4thSaturdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 4th Saturday of a specified month and year.
 
.DESCRIPTION
The Get-4thSaturdayOfMonth function calculates the date of the 4th Saturday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 4th Saturday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-4thSaturdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 4th Saturday of September 2024.
 
.EXAMPLE
$day = Get-4thSaturdayOfMonth -Month 12 -Year 2023
Write-Output "The 4th Saturday of December 2023 is on: $day"
 
Calculates the 4th Saturday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-4thSaturdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 4th Saturday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 4th Saturday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-4thSaturdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Saturday -Nth 4
}
#EndRegion '.\Generated\Get-4thSaturdayOfMonth.ps1' 45
#Region '.\Generated\Get-4thSundayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 4th Sunday of a specified month and year.
 
.DESCRIPTION
The Get-4thSundayOfMonth function calculates the date of the 4th Sunday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 4th Sunday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-4thSundayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 4th Sunday of September 2024.
 
.EXAMPLE
$day = Get-4thSundayOfMonth -Month 12 -Year 2023
Write-Output "The 4th Sunday of December 2023 is on: $day"
 
Calculates the 4th Sunday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-4thSundayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 4th Sunday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 4th Sunday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-4thSundayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Sunday -Nth 4
}
#EndRegion '.\Generated\Get-4thSundayOfMonth.ps1' 45
#Region '.\Generated\Get-4thThursdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 4th Thursday of a specified month and year.
 
.DESCRIPTION
The Get-4thThursdayOfMonth function calculates the date of the 4th Thursday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 4th Thursday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-4thThursdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 4th Thursday of September 2024.
 
.EXAMPLE
$day = Get-4thThursdayOfMonth -Month 12 -Year 2023
Write-Output "The 4th Thursday of December 2023 is on: $day"
 
Calculates the 4th Thursday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-4thThursdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 4th Thursday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 4th Thursday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-4thThursdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Thursday -Nth 4
}
#EndRegion '.\Generated\Get-4thThursdayOfMonth.ps1' 45
#Region '.\Generated\Get-4thTuesdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 4th Tuesday of a specified month and year.
 
.DESCRIPTION
The Get-4thTuesdayOfMonth function calculates the date of the 4th Tuesday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 4th Tuesday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-4thTuesdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 4th Tuesday of September 2024.
 
.EXAMPLE
$day = Get-4thTuesdayOfMonth -Month 12 -Year 2023
Write-Output "The 4th Tuesday of December 2023 is on: $day"
 
Calculates the 4th Tuesday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-4thTuesdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 4th Tuesday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 4th Tuesday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-4thTuesdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Tuesday -Nth 4
}
#EndRegion '.\Generated\Get-4thTuesdayOfMonth.ps1' 45
#Region '.\Generated\Get-4thWednesdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 4th Wednesday of a specified month and year.
 
.DESCRIPTION
The Get-4thWednesdayOfMonth function calculates the date of the 4th Wednesday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 4th Wednesday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-4thWednesdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 4th Wednesday of September 2024.
 
.EXAMPLE
$day = Get-4thWednesdayOfMonth -Month 12 -Year 2023
Write-Output "The 4th Wednesday of December 2023 is on: $day"
 
Calculates the 4th Wednesday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-4thWednesdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 4th Wednesday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 4th Wednesday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-4thWednesdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Wednesday -Nth 4
}
#EndRegion '.\Generated\Get-4thWednesdayOfMonth.ps1' 45
#Region '.\Generated\Get-5thFridayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 5th Friday of a specified month and year.
 
.DESCRIPTION
The Get-5thFridayOfMonth function calculates the date of the 5th Friday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 5th Friday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-5thFridayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 5th Friday of September 2024.
 
.EXAMPLE
$day = Get-5thFridayOfMonth -Month 12 -Year 2023
Write-Output "The 5th Friday of December 2023 is on: $day"
 
Calculates the 5th Friday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-5thFridayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 5th Friday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 5th Friday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-5thFridayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Friday -Nth 5
}
#EndRegion '.\Generated\Get-5thFridayOfMonth.ps1' 45
#Region '.\Generated\Get-5thLastFridayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 5th Last Friday of a specified month and year.
 
.DESCRIPTION
The Get-5thLastFridayOfMonth function calculates the date of the 5th Last Friday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 5th Last Friday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-5thLastFridayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 5th Last Friday of September 2024.
 
.EXAMPLE
$day = Get-5thLastFridayOfMonth -Month 12 -Year 2023
Write-Output "The 5th Last Friday of December 2023 is on: $day"
 
Calculates the 5th Last Friday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-5thLastFridayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 5th Last Friday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 5th Last Friday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-5thLastFridayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Friday -Nth 5
}
#EndRegion '.\Generated\Get-5thLastFridayOfMonth.ps1' 45
#Region '.\Generated\Get-5thLastMondayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 5th Last Monday of a specified month and year.
 
.DESCRIPTION
The Get-5thLastMondayOfMonth function calculates the date of the 5th Last Monday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 5th Last Monday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-5thLastMondayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 5th Last Monday of September 2024.
 
.EXAMPLE
$day = Get-5thLastMondayOfMonth -Month 12 -Year 2023
Write-Output "The 5th Last Monday of December 2023 is on: $day"
 
Calculates the 5th Last Monday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-5thLastMondayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 5th Last Monday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 5th Last Monday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-5thLastMondayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Monday -Nth 5
}
#EndRegion '.\Generated\Get-5thLastMondayOfMonth.ps1' 45
#Region '.\Generated\Get-5thLastSaturdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 5th Last Saturday of a specified month and year.
 
.DESCRIPTION
The Get-5thLastSaturdayOfMonth function calculates the date of the 5th Last Saturday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 5th Last Saturday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-5thLastSaturdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 5th Last Saturday of September 2024.
 
.EXAMPLE
$day = Get-5thLastSaturdayOfMonth -Month 12 -Year 2023
Write-Output "The 5th Last Saturday of December 2023 is on: $day"
 
Calculates the 5th Last Saturday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-5thLastSaturdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 5th Last Saturday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 5th Last Saturday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-5thLastSaturdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Saturday -Nth 5
}
#EndRegion '.\Generated\Get-5thLastSaturdayOfMonth.ps1' 45
#Region '.\Generated\Get-5thLastSundayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 5th Last Sunday of a specified month and year.
 
.DESCRIPTION
The Get-5thLastSundayOfMonth function calculates the date of the 5th Last Sunday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 5th Last Sunday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-5thLastSundayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 5th Last Sunday of September 2024.
 
.EXAMPLE
$day = Get-5thLastSundayOfMonth -Month 12 -Year 2023
Write-Output "The 5th Last Sunday of December 2023 is on: $day"
 
Calculates the 5th Last Sunday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-5thLastSundayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 5th Last Sunday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 5th Last Sunday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-5thLastSundayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Sunday -Nth 5
}
#EndRegion '.\Generated\Get-5thLastSundayOfMonth.ps1' 45
#Region '.\Generated\Get-5thLastThursdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 5th Last Thursday of a specified month and year.
 
.DESCRIPTION
The Get-5thLastThursdayOfMonth function calculates the date of the 5th Last Thursday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 5th Last Thursday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-5thLastThursdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 5th Last Thursday of September 2024.
 
.EXAMPLE
$day = Get-5thLastThursdayOfMonth -Month 12 -Year 2023
Write-Output "The 5th Last Thursday of December 2023 is on: $day"
 
Calculates the 5th Last Thursday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-5thLastThursdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 5th Last Thursday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 5th Last Thursday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-5thLastThursdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Thursday -Nth 5
}
#EndRegion '.\Generated\Get-5thLastThursdayOfMonth.ps1' 45
#Region '.\Generated\Get-5thLastTuesdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 5th Last Tuesday of a specified month and year.
 
.DESCRIPTION
The Get-5thLastTuesdayOfMonth function calculates the date of the 5th Last Tuesday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 5th Last Tuesday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-5thLastTuesdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 5th Last Tuesday of September 2024.
 
.EXAMPLE
$day = Get-5thLastTuesdayOfMonth -Month 12 -Year 2023
Write-Output "The 5th Last Tuesday of December 2023 is on: $day"
 
Calculates the 5th Last Tuesday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-5thLastTuesdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 5th Last Tuesday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 5th Last Tuesday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-5thLastTuesdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Tuesday -Nth 5
}
#EndRegion '.\Generated\Get-5thLastTuesdayOfMonth.ps1' 45
#Region '.\Generated\Get-5thLastWednesdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 5th Last Wednesday of a specified month and year.
 
.DESCRIPTION
The Get-5thLastWednesdayOfMonth function calculates the date of the 5th Last Wednesday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 5th Last Wednesday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-5thLastWednesdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 5th Last Wednesday of September 2024.
 
.EXAMPLE
$day = Get-5thLastWednesdayOfMonth -Month 12 -Year 2023
Write-Output "The 5th Last Wednesday of December 2023 is on: $day"
 
Calculates the 5th Last Wednesday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-5thLastWednesdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 5th Last Wednesday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the 5th Last Wednesday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-5thLastWednesdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Wednesday -Nth 5
}
#EndRegion '.\Generated\Get-5thLastWednesdayOfMonth.ps1' 45
#Region '.\Generated\Get-5thMondayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 5th Monday of a specified month and year.
 
.DESCRIPTION
The Get-5thMondayOfMonth function calculates the date of the 5th Monday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 5th Monday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-5thMondayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 5th Monday of September 2024.
 
.EXAMPLE
$day = Get-5thMondayOfMonth -Month 12 -Year 2023
Write-Output "The 5th Monday of December 2023 is on: $day"
 
Calculates the 5th Monday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-5thMondayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 5th Monday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 5th Monday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-5thMondayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Monday -Nth 5
}
#EndRegion '.\Generated\Get-5thMondayOfMonth.ps1' 45
#Region '.\Generated\Get-5thSaturdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 5th Saturday of a specified month and year.
 
.DESCRIPTION
The Get-5thSaturdayOfMonth function calculates the date of the 5th Saturday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 5th Saturday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-5thSaturdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 5th Saturday of September 2024.
 
.EXAMPLE
$day = Get-5thSaturdayOfMonth -Month 12 -Year 2023
Write-Output "The 5th Saturday of December 2023 is on: $day"
 
Calculates the 5th Saturday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-5thSaturdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 5th Saturday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 5th Saturday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-5thSaturdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Saturday -Nth 5
}
#EndRegion '.\Generated\Get-5thSaturdayOfMonth.ps1' 45
#Region '.\Generated\Get-5thSundayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 5th Sunday of a specified month and year.
 
.DESCRIPTION
The Get-5thSundayOfMonth function calculates the date of the 5th Sunday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 5th Sunday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-5thSundayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 5th Sunday of September 2024.
 
.EXAMPLE
$day = Get-5thSundayOfMonth -Month 12 -Year 2023
Write-Output "The 5th Sunday of December 2023 is on: $day"
 
Calculates the 5th Sunday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-5thSundayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 5th Sunday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 5th Sunday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-5thSundayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Sunday -Nth 5
}
#EndRegion '.\Generated\Get-5thSundayOfMonth.ps1' 45
#Region '.\Generated\Get-5thThursdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 5th Thursday of a specified month and year.
 
.DESCRIPTION
The Get-5thThursdayOfMonth function calculates the date of the 5th Thursday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 5th Thursday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-5thThursdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 5th Thursday of September 2024.
 
.EXAMPLE
$day = Get-5thThursdayOfMonth -Month 12 -Year 2023
Write-Output "The 5th Thursday of December 2023 is on: $day"
 
Calculates the 5th Thursday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-5thThursdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 5th Thursday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 5th Thursday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-5thThursdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Thursday -Nth 5
}
#EndRegion '.\Generated\Get-5thThursdayOfMonth.ps1' 45
#Region '.\Generated\Get-5thTuesdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 5th Tuesday of a specified month and year.
 
.DESCRIPTION
The Get-5thTuesdayOfMonth function calculates the date of the 5th Tuesday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 5th Tuesday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-5thTuesdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 5th Tuesday of September 2024.
 
.EXAMPLE
$day = Get-5thTuesdayOfMonth -Month 12 -Year 2023
Write-Output "The 5th Tuesday of December 2023 is on: $day"
 
Calculates the 5th Tuesday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-5thTuesdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 5th Tuesday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 5th Tuesday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-5thTuesdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Tuesday -Nth 5
}
#EndRegion '.\Generated\Get-5thTuesdayOfMonth.ps1' 45
#Region '.\Generated\Get-5thWednesdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the 5th Wednesday of a specified month and year.
 
.DESCRIPTION
The Get-5thWednesdayOfMonth function calculates the date of the 5th Wednesday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the 5th Wednesday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-5thWednesdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the 5th Wednesday of September 2024.
 
.EXAMPLE
$day = Get-5thWednesdayOfMonth -Month 12 -Year 2023
Write-Output "The 5th Wednesday of December 2023 is on: $day"
 
Calculates the 5th Wednesday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-5thWednesdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the 5th Wednesday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthWeekdayOfMonth, specifically configured to find the 5th Wednesday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-5thWednesdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthWeekdayOfMonth -Year $Year -Month $Month -WeekDay Wednesday -Nth 5
}
#EndRegion '.\Generated\Get-5thWednesdayOfMonth.ps1' 45
#Region '.\Generated\Get-LastFridayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the Last Friday of a specified month and year.
 
.DESCRIPTION
The Get-LastFridayOfMonth function calculates the date of the Last Friday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the Last Friday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-LastFridayOfMonth -Month 9 -Year 2024
 
This command returns the date of the Last Friday of September 2024.
 
.EXAMPLE
$day = Get-LastFridayOfMonth -Month 12 -Year 2023
Write-Output "The Last Friday of December 2023 is on: $day"
 
Calculates the Last Friday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-LastFridayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the Last Friday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the Last Friday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-LastFridayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Friday -Nth 1
}
#EndRegion '.\Generated\Get-LastFridayOfMonth.ps1' 45
#Region '.\Generated\Get-LastMondayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the Last Monday of a specified month and year.
 
.DESCRIPTION
The Get-LastMondayOfMonth function calculates the date of the Last Monday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the Last Monday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-LastMondayOfMonth -Month 9 -Year 2024
 
This command returns the date of the Last Monday of September 2024.
 
.EXAMPLE
$day = Get-LastMondayOfMonth -Month 12 -Year 2023
Write-Output "The Last Monday of December 2023 is on: $day"
 
Calculates the Last Monday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-LastMondayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the Last Monday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the Last Monday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-LastMondayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Monday -Nth 1
}
#EndRegion '.\Generated\Get-LastMondayOfMonth.ps1' 45
#Region '.\Generated\Get-LastSaturdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the Last Saturday of a specified month and year.
 
.DESCRIPTION
The Get-LastSaturdayOfMonth function calculates the date of the Last Saturday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the Last Saturday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-LastSaturdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the Last Saturday of September 2024.
 
.EXAMPLE
$day = Get-LastSaturdayOfMonth -Month 12 -Year 2023
Write-Output "The Last Saturday of December 2023 is on: $day"
 
Calculates the Last Saturday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-LastSaturdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the Last Saturday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the Last Saturday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-LastSaturdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Saturday -Nth 1
}
#EndRegion '.\Generated\Get-LastSaturdayOfMonth.ps1' 45
#Region '.\Generated\Get-LastSundayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the Last Sunday of a specified month and year.
 
.DESCRIPTION
The Get-LastSundayOfMonth function calculates the date of the Last Sunday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the Last Sunday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-LastSundayOfMonth -Month 9 -Year 2024
 
This command returns the date of the Last Sunday of September 2024.
 
.EXAMPLE
$day = Get-LastSundayOfMonth -Month 12 -Year 2023
Write-Output "The Last Sunday of December 2023 is on: $day"
 
Calculates the Last Sunday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-LastSundayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the Last Sunday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the Last Sunday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-LastSundayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Sunday -Nth 1
}
#EndRegion '.\Generated\Get-LastSundayOfMonth.ps1' 45
#Region '.\Generated\Get-LastThursdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the Last Thursday of a specified month and year.
 
.DESCRIPTION
The Get-LastThursdayOfMonth function calculates the date of the Last Thursday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the Last Thursday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-LastThursdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the Last Thursday of September 2024.
 
.EXAMPLE
$day = Get-LastThursdayOfMonth -Month 12 -Year 2023
Write-Output "The Last Thursday of December 2023 is on: $day"
 
Calculates the Last Thursday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-LastThursdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the Last Thursday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the Last Thursday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-LastThursdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Thursday -Nth 1
}
#EndRegion '.\Generated\Get-LastThursdayOfMonth.ps1' 45
#Region '.\Generated\Get-LastTuesdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the Last Tuesday of a specified month and year.
 
.DESCRIPTION
The Get-LastTuesdayOfMonth function calculates the date of the Last Tuesday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the Last Tuesday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-LastTuesdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the Last Tuesday of September 2024.
 
.EXAMPLE
$day = Get-LastTuesdayOfMonth -Month 12 -Year 2023
Write-Output "The Last Tuesday of December 2023 is on: $day"
 
Calculates the Last Tuesday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-LastTuesdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the Last Tuesday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the Last Tuesday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-LastTuesdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Tuesday -Nth 1
}
#EndRegion '.\Generated\Get-LastTuesdayOfMonth.ps1' 45
#Region '.\Generated\Get-LastWednesdayOfMonth.ps1' -1

<#
.SYNOPSIS
Calculates the date of the Last Wednesday of a specified month and year.
 
.DESCRIPTION
The Get-LastWednesdayOfMonth function calculates the date of the Last Wednesday in the specified month and year. It simplifies the process of identifying the date for scheduling events or meetings that recur on the Last Wednesday of a month.
 
.PARAMETER Month
The numeric value representing the month. This parameter is mandatory and must be an integer between 1 (January) and 12 (December).
 
.PARAMETER Year
The numeric value representing the year. This parameter is mandatory and must be a integer between 1 and 9999.
 
.EXAMPLE
Get-LastWednesdayOfMonth -Month 9 -Year 2024
 
This command returns the date of the Last Wednesday of September 2024.
 
.EXAMPLE
$day = Get-LastWednesdayOfMonth -Month 12 -Year 2023
Write-Output "The Last Wednesday of December 2023 is on: $day"
 
Calculates the Last Wednesday of December 2023, assigns it to the variable $day, and prints it.
 
.INPUTS
None. You cannot pipe input to Get-LastWednesdayOfMonth.
 
.OUTPUTS
System.DateTime
This function returns a System.DateTime object representing the Last Wednesday of the given month and year.
 
.NOTES
This function is a wrapper around Get-NthLastWeekdayOfMonth, specifically configured to find the Last Wednesday of the month. Ensure the 'Month' and 'Year' parameters are within their valid ranges to avoid exceptions.
 
#>

function Get-LastWednesdayOfMonth {
    [Alias('')]
    [OutputType([System.DateTime])]
    param (
        [Parameter(Mandatory)][int]$Month,
        [Parameter(Mandatory)][int]$Year
    )
    Get-NthLastWeekdayOfMonth -Year $Year -Month $Month -WeekDay Wednesday -Nth 1
}
#EndRegion '.\Generated\Get-LastWednesdayOfMonth.ps1' 45