payrolldates
Install Locally
pip install -e .
Install from github
pip install "payrolldates @ git+https://<github_token>@github.com/Davenport-Iowa/cod-py-payroll-dates.git"
Testing
Install Test Dependancies
pip install .[test]
Run Tests
pytest
Usage
Description
Use the library to determine start and end dates of payroll
You can pass a date to the functions to get the start and end payroll dates for a specific date.
Import
# import functions from the package
from payrolldates.calc import get_pay_period, is_date_in_first_week, print_pay_period
# Use full std lib for dates
from datetime import datetime
Usage
Get payperiod from date
# Get the start and end dates for the current payperiod
start_date, end_date = get_pay_period(datetime.now())
Get a historical payperiod from date
start_date, end_date = get_pay_period(datetime(2024, 4, 27))
You can also check if it is the first week of the payroll
[!TIP] is_date_in_first_week(date) is helpful if determining when to run an automated job
if is_date_in_first_week(datetime.now()):
print("First Week!")
else:
print("Not First Week")
Metadata
Release files for codi_payrolldates 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| codi_payrolldates-0.3.0.tar.gz | 3.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| codi_payrolldates-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.0 kB
Release files / codi_payrolldates-0.3.0.tar.gz
| Download URL | codi_payrolldates-0.3.0.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
935ad5a3eed7a2d61e4815210d72c133ef3cece7fd32f37fc8d58cc459d50d85
|
|
BLAKE2b-256 checksum How to use checksums |
50319ef5f34d027b1a67288fd5b54e56503e4602224e18a1f7decb05eb6fc415
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.32.3
|
Release files / codi_payrolldates-0.3.0-py3-none-any.whl
| Download URL | codi_payrolldates-0.3.0-py3-none-any.whl |
|---|---|
| Size | 2.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28559b19851b0249feca4312e12da55051776a72d5c969647917847107dcaf60
|
|
BLAKE2b-256 checksum How to use checksums |
3d40c9783bd2451ddcee012798d4024fc050c83429b9b6c1df7a37276b8c73ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.32.3
|
Security for codi_payrolldates 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.