Skip to content

Instantly share code, notes, and snippets.

Last active November 15, 2016 14:14
What would you like to do?
#Define Quarters
$Quarters = @{}
$Start = Get-Date -Month 1 -Date 1 -Year (Get-Date).Year
ForEach ($Q in (1..4))
From = $Start
To = $Start.AddMonths(3).AddTicks(-1)
$Start = $Start.AddMonths(3)
#Define this quarter
$Quarter = [int]([math]::Ceiling((Get-Date -Format MM)/3))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment