"업무 일"은 조직마다 다릅니다. 일부 조직은 다른 조직에서하는 공휴일에는 업무를 수행하지 않습니다. 당신은 휴일을 처리하려면 올바르게 (OP 이해 보인다) 형식의 세부 사항을 생략 비즈니스
을 위해 휴일의 명시 적 목록을해야이 그것을 수행해야합니다
# $date is input date
$nextBizDay = $date.adddays(1)
# You would probably want to generate the follow list programmatically,
# instead of manually as done here
$holidays = 1, <# New Years #>
18, <# MLK day 2016 #>
<# other holidays encoded as Day Of Year #>
360 <# Christmas in a Leap Year #>
# An alternative to a list of holidays like this is to find a web service
# you can query to get the holidays for a given year
while ($nextBizDay.DayOfWeek -eq 'Saturday' -or
$nextBizDay.DayOfWeek -eq 'Sunday' -or
$nextBizDay.DayOfYear -in $holidays) {
if ($nextBizDay.DayOfYear -gt 366) {
throw "No next business day this year. Need to add additional logic"
}
$nextBizDay = $nextBizDay.adddays(1)
}
을 당신은 월요일 의미 - 금요일 ? 휴일로 어떻게 일합니까? –
이것은 다음과 같은 경우에 유용 할 수 있습니다. https://www.reddit.com/r/PowerShell/comments/4j9usl/getdate_next_business_day/ –