Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

From day of year get the fool date

$
0
0

Hello

Pls, How i get the fool date from this scripte?!

cls

$year = "2019"
$cd = ([datetime]"12/25/$year").tooadate()
 $array = 1..29 |% {
     if (($cd - $_) % 7 -eq 1){
         [datetime]::fromoadate($cd - $_).DayOfYear
         }
     }
 [string]$array0 = $array[0]
 $array0+" days from 1.1."+$year
 [string]$array1 = $array[1]
 $array1+" days from 1.1."+$year
 [string]$array2 = $array[2]
 $array2+" days from 1.1."+$year
 [string]$array3 = $array[1]
 $array3+" days from 1.1."+$year

I get:

356 days from 1.1.2019

349 days from 1.1.2019

342 days from 1.1.2019

349 days from 1.1.2019

Now the fool date is for each is?

Thanks for your Help

Arnold



Viewing all articles
Browse latest Browse all 15028

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>