All Projects β†’ adamjstewart β†’ fiscalyear

adamjstewart / fiscalyear

Licence: MIT License
πŸ“† Utilities for managing the fiscal calendar

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to fiscalyear

Calendar Links
Generate add to calendar links for Google, iCal and other calendar systems
Stars: ✭ 544 (+1548.48%)
Mutual labels:  datetime, calendar
Timex
A complete date/time library for Elixir projects.
Stars: ✭ 1,538 (+4560.61%)
Mutual labels:  datetime, calendar
Period
PHP's time range API
Stars: ✭ 616 (+1766.67%)
Mutual labels:  datetime, calendar
Zebra datepicker
A super-lightweight, highly configurable, cross-browser date / time picker jQuery plugin
Stars: ✭ 367 (+1012.12%)
Mutual labels:  datetime, calendar
Time
Building a better date/time library for Swift
Stars: ✭ 1,983 (+5909.09%)
Mutual labels:  datetime, calendar
Calendarview
An Easy to Use Calendar for iOS (Swift 5.0)
Stars: ✭ 429 (+1200%)
Mutual labels:  datetime, calendar
Laydate
layDate(ζ—₯ζœŸδΈŽζ—Άι—΄η»„δ»ΆοΌ‰ 是 layui η‹¬η«‹η»΄ζŠ€ηš„δΈ‰ε€§η»„δ»ΆδΉ‹δΈ€
Stars: ✭ 1,066 (+3130.3%)
Mutual labels:  datetime, calendar
nepali-datetime
Python's core datetime inspired nepali datetime (BS date & NPT) package πŸ‡³πŸ‡΅
Stars: ✭ 36 (+9.09%)
Mutual labels:  datetime, calendar
Tail.datetime
A lightweight, translat- and configurable Open Source DateTime Picker, written in pure vanilla JavaScript!
Stars: ✭ 139 (+321.21%)
Mutual labels:  datetime, calendar
Calendar
πŸ“… PHP Date & Time library that solves common problems in object oriented, immutable way.
Stars: ✭ 113 (+242.42%)
Mutual labels:  datetime, calendar
Pandas market calendars
Exchange calendars to use with pandas for trading applications
Stars: ✭ 319 (+866.67%)
Mutual labels:  datetime, calendar
Dpicker
A framework-agnostic minimal date picker
Stars: ✭ 187 (+466.67%)
Mutual labels:  datetime, calendar
React Datetime Picker
A datetime picker for your React app.
Stars: ✭ 294 (+790.91%)
Mutual labels:  datetime, calendar
Angular Moment Picker
Angular Moment Picker is an AngularJS directive for date and time picker using Moment.js.
Stars: ✭ 536 (+1524.24%)
Mutual labels:  datetime, calendar
Datez
πŸ“† Breeze through Date, DateComponents, and TimeInterval with Swift!
Stars: ✭ 254 (+669.7%)
Mutual labels:  datetime, calendar
React Calendar
A React Native inspired date list renderer
Stars: ✭ 34 (+3.03%)
Mutual labels:  datetime, calendar
Pg Calendar
πŸ“† beautiful and eidetic date picker
Stars: ✭ 109 (+230.3%)
Mutual labels:  datetime, calendar
Date
A date and time library based on the C++11/14/17 <chrono> header
Stars: ✭ 2,389 (+7139.39%)
Mutual labels:  datetime, calendar
shamsi date
A Flutter and Dart package for using Jalali (Shamsi, Solar, Persian or Jalaali) calendar. You can convert, format and manipulate Jalali and Gregorian (Miladi) date and times.
Stars: ✭ 59 (+78.79%)
Mutual labels:  datetime, calendar
markdown-it-calendar
Automatically produced markdown-it-calendar
Stars: ✭ 23 (-30.3%)
Mutual labels:  calendar
https://readthedocs.org/projects/fiscalyear/badge/?version=latest https://img.shields.io/spack/v/py-torchgeo

Overview

fiscalyear is a small, lightweight Python module providing helpful utilities for managing the fiscal calendar. It is designed as an extension of the built-in datetime and calendar modules, adding the ability to query the fiscal year, fiscal quarter, fiscal month, and fiscal day of a date or datetime object.

Basic Usage

fiscalyear provides several useful classes.

FiscalYear

The FiscalYear class provides an object for storing information about the start and end of a particular fiscal year.

>>> from fiscalyear import *
>>> a = FiscalYear(2017)
>>> a.start
FiscalDateTime(2016, 10, 1, 0, 0)
>>> a.end
FiscalDateTime(2017, 9, 30, 23, 59, 59)
>>> a.isleap
False

You can also get the current FiscalYear with:

>>> FiscalYear.current()
FiscalYear(2018)

FiscalQuarter

The FiscalYear class also allows you to query information about a specific fiscal quarter.

>>> a.q3.start
FiscalDateTime(2017, 4, 1, 0, 0)
>>> a.q3.end
FiscalDateTime(2017, 6, 30, 23, 59, 59)

These objects represent the standalone FiscalQuarter class.

>>> b = FiscalQuarter(2017, 3)
>>> b.start
FiscalDateTime(2017, 4, 1, 0, 0)
>>> b.end
FiscalDateTime(2017, 6, 30, 23, 59, 59)
>>> a.q3 == b
True
>>> b in a
True
>>> b.next_fiscal_quarter
FiscalQuarter(2017, 4)

You can also get the current FiscalQuarter with:

>>> FiscalQuarter.current()
FiscalQuarter(2018, 2)

FiscalMonth

The FiscalMonth class allows you to keep track of the fiscal month.

>>> c = FiscalMonth(2017, 9)
>>> c.start
FiscalDateTime(2017, 6, 1, 0, 0)
>>> c.end
FiscalDateTime(2017, 6, 30, 23, 59, 59)
>>> c in a
True
>>> c in b
True
>>> c.next_fiscal_month
FiscalMonth(2017, 10)

You can also get the current FiscalMonth with:

>>> FiscalMonth.current()
FiscalMonth(2018, 4)

FiscalDay

To keep track of the fiscal day, use the FiscalDay class.

>>> d = FiscalDay(2017, 250)
>>> d.start
FiscalDateTime(2017, 6, 6, 0, 0)
>>> d.end
FiscalDateTime(2017, 6, 6, 23, 59, 59)
>>> d in a
True
>>> d in b
True
>>> d in c
True
>>> d.next_fiscal_day
FiscalDay(2017, 251)

You can also get the current FiscalDay with:

>>> FiscalDay.current()
FiscalDay(2018, 94)

FiscalDateTime

The start and end of each of the above objects are stored as instances of the FiscalDateTime class. This class provides all of the same features as the datetime class, with the addition of the ability to query the fiscal year, fiscal quarter, fiscal month, and fiscal day.

>>> e = FiscalDateTime.now()
>>> e
FiscalDateTime(2017, 4, 8, 20, 30, 31, 105323)
>>> e.fiscal_year
2017
>>> e.fiscal_quarter
3
>>> e.next_fiscal_quarter
FiscalQuarter(2017, 4)
>>> e.fiscal_month
7
>>> e.fiscal_day
190

FiscalDate

If you don't care about the time component of the FiscalDateTime class, the FiscalDate class is right for you.

>>> f = FiscalDate.today()
>>> f
FiscalDate(2017, 4, 8)
>>> f.fiscal_year
2017
>>> f.prev_fiscal_year
FiscalYear(2016)

Installation

fiscalyear has no dependencies, making it simple and easy to install. The recommended way to install fiscalyear is with pip.

$ pip install fiscalyear

For alternate installation methods, see the Installation Documentation.

Documentation

Documentation is hosted on Read the Docs.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].