Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1 +0,0 @@
|
|||
2008..2121 | Where-Object { (Get-Date $_-12-25).DayOfWeek -eq "Sunday" }
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
function Get-ChristmasHoliday
|
||||
{
|
||||
[CmdletBinding()]
|
||||
[OutputType([PSCustomObject])]
|
||||
Param
|
||||
(
|
||||
[Parameter(Mandatory=$false,
|
||||
ValueFromPipeline=$true,
|
||||
ValueFromPipelineByPropertyName=$true,
|
||||
Position=0)]
|
||||
[ValidateRange(1,9999)]
|
||||
[int[]]
|
||||
$Year = (Get-Date).Year
|
||||
)
|
||||
|
||||
Process
|
||||
{
|
||||
[datetime]$christmas = Get-Date $Year/12/25
|
||||
|
||||
switch ($christmas.DayOfWeek)
|
||||
{
|
||||
"Sunday" {[datetime[]]$dates = 1..5 | ForEach-Object {$christmas.AddDays($_)}}
|
||||
"Monday" {[datetime[]]$dates = $christmas, $christmas.AddDays(1)}
|
||||
"Saturday" {[datetime[]]$dates = $christmas.AddDays(-2), $christmas.AddDays(-1)}
|
||||
Default {[datetime[]]$dates = $christmas.AddDays(-1), $christmas}
|
||||
}
|
||||
|
||||
$dates | Group-Object -Property Year |
|
||||
Select-Object -Property @{Name="Year" ; Expression={$_.Name}},
|
||||
@{Name="DayOfWeek"; Expression={$christmas.DayOfWeek}},
|
||||
@{Name="Christmas"; Expression={$christmas.ToString("MM/dd/yyyy")}},
|
||||
@{Name="DaysOff" ; Expression={$_.Group | ForEach-Object {$_.ToString("MM/dd/yyyy")}}}
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
2008..2121 | Get-ChristmasHoliday | where DayOfWeek -match Su
|
||||
|
|
@ -1 +0,0 @@
|
|||
Get-ChristmasHoliday -Year (2008..2121 | Get-Random)
|
||||
|
|
@ -1 +0,0 @@
|
|||
(Get-Date | Get-ChristmasHoliday).DaysOff
|
||||
|
|
@ -1 +0,0 @@
|
|||
(Get-Date | Get-ChristmasHoliday).DaysOff | Get-Date
|
||||
Loading…
Add table
Add a link
Reference in a new issue