Skip to main content

445 Fiscal calendar

Project description

fiscal445

Description

This script was developed to simplify the determination of reporting dates when using a 445 financial calendar. Many companies use the 445 calendar for financial reporting and it is difficult when setting up reports for YTD, MTD, by quarter runs while only relying on a standard calendar. This module simplifies this by allowing you to set your own start of the year date and weekending day.

Prerequisites

Built and tested using

python 3.6+, pandas 0.25.3+, numpy 1.18.0, datetime, sys,

Deployment

General Deployment

python -m pip install fiscal445

Usage

Import the module

import fiscal445 as fc5

Set the modules parameters.

To initialize the 445 calendar table

Syntax: fc5.cal = fc5.Calendar('YYYY-MM-DD','day').build() where the date is the start of your fiscal 445 year and the day arg is the the last day of your fiscal week.

Examples:

fc5.cal = fc5.Calendar('2020-02-02','sat').build()

Week of the month it is based on 445 fiscal calendar

fc5.cal.show.cur_week_of_month()

returns 1 based on example date


fc5.cal.show.prior_week_of_month()

returns 5 based on example date


Week of the year it is based on 445

fc5.cal.show.cur_week_of_year()

returns 5


Which month of the year it is based on 445 calendar

fc5.cal.show.cur_month({optional arg})

returns 'March' without optional arg

With optional arg example: fc5.cal.show.cur_month(3) Returns a sliced string, where the length is based on the optional int arg, representing the name of the month ('Mar') of the year it is, based on the 445 calendar'''


Which month of the year it is based on 445 calendar minus one week

fc5.cal.show.month_of_prior_week({optional arg})

returns 'March' without optional arg

With optional arg example: fc5.cal.show.month_of_prior_week(3) Returns a sliced string, where the length is based on the optional int arg, representing the name of the month ('Mar') of the year it is, based on the 445 calendar minus one week'''


Start and end for month to date

fc5.cal.show.month_to_date()

Returns a tuple of the start and end date for month to date reports

('2020-03-01', '2020-03-09')


Start and end for month to date most recent week completed

fc5.cal.show.month_to_date_completed()

returns a tuple of the start and end date for month to date reports for up to the most completed week

('2020-03-01', '2020-03-08')

returns the following if there has not been an entire complete fiscal week for that month.

'Not available yet!'


Start and end for year to date

fc5.cal.show.year_to_date()

returns a tuple

('2020-02-02', '2020-03-07')


Start and end for year to date most recent week completed

fc5.cal.show.year_to_date_completed

returns a tuple

('2020-02-02', '2020-02-29')


Start and end dates for completed quarters.

1 for Q1, 2 for Q2, 3 for Q3, 4 for Q4

arg is int value for quarter indicated above. fc5.cal.show.quarter_dates(arg)

fc5.cal.show.quarter_dates(1)

returns a tuple

('2020-02-02', '2020-05-02')


Start and end for quarter to date.

1 for Q1, 2 for Q2, 3 for Q3, 4 for Q4

arg is int value for quarter above. fc5.cal.show.quarter_to_date(arg)

fc5.cal.show.quarter_to_date(1)

returns a tuple

('2020-02-02', '2020-03-07')

returns the following if the current date is before the requested quarter

'Quarter not available!'


To view the entire calendar after you have initialized it.

print(fc5.cal)

Authors

Dv8edRoute - Original code

License

MIT

Acknowledgments

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fiscal445-0.1.3.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fiscal445-0.1.3-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file fiscal445-0.1.3.tar.gz.

File metadata

  • Download URL: fiscal445-0.1.3.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

File hashes

Hashes for fiscal445-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b7ee62ba84d3817c9ab17fbba3c7422438d2d464deefcfbf11090f84ed69782a
MD5 49400ec6aa3ded428434291aedbf2c09
BLAKE2b-256 42c8d8480689d671ce9e57dbc615f144b09123991c4df95506d933076cbf0eed

See more details on using hashes here.

File details

Details for the file fiscal445-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: fiscal445-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

File hashes

Hashes for fiscal445-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 841da44c7910518f09502144c320ec5b31f52d8e51db70a845448fd21523f730
MD5 6bfa99e0045dc96dc382b085edd6c1c7
BLAKE2b-256 6da4a18b6b81f8ac811a52f3bbd8745bd19f9dd5c659cee7b7e3aa31b5bfedb4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page