Skip to content

QuarterYear is a PowerShell module which makes it easier to perform quarterly (calendar/fiscal year) calculations

License

Notifications You must be signed in to change notification settings

ryan-leap/QuarterYear

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

QuarterYear

QuarterYear is a PowerShell module which makes it easier to perform quarterly (calendar/fiscal year) calculations

Installing

Download from GitHub repository

  • Download the repository from https://github.com/ryan-leap/QuarterYear
  • Unblock the zip file ((on Windows) Right Click -> Properties -> [v/] Unblock)
  • Extract the QuarterYear folder to a module path (e.g. $home\Documents\WindowsPowerShell\Modules)

Usage

# Import the module
Import-Module -Name QuarterYear

# Get the available commands
Get-Command -Module QuarterYear

# Get help
Get-Help QuarterYear

Examples

Get-QuarterYear

# Returns the quarter of the current date for the current calendar year
Get-QuarterYear

# Returns the quarter of the current date when the (fiscal) year ends June 30th
Get-QuarterYear -YearEndDate (Get-Date -Month 6 -Day 30)

Get-QuarterYearDate

# Returns the end date of the second quarter for the current calendar year
Get-QuarterYearDate -Quarter 2

# Uses the pipeline to return the end date of each quarter for the current calendar year
1,2,3,4 | Get-QuarterYearDate

# Returns the first day of each quarter for the current calendar year
1,2,3,4 | Get-QuarterYearDate -FirstDay

# Returns the end date of each quarter for the (fiscal) year specified
1,2,3,4 | Get-QuarterYearDate -YearEndDate (Get-Date -Year 2020 -Month 6 -Day 30)

# Returns the first business day of the first quarter that doesn't fall on one of the provided holidays (business blackout dates)
Get-QuarterYearDate -Quarter 1 -FirstDay -BusinessDay -BusinessBlackoutDate ((Get-Date -Month 1 -Day 1),(Get-Date -Month 12 -Day 25))

Author(s)

  • Ryan Leap - Initial work

License

Licensed under the MIT License. See LICENSE file for details.

Acknowledgments

About

QuarterYear is a PowerShell module which makes it easier to perform quarterly (calendar/fiscal year) calculations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy