Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Make working with business days less painful

License

NotificationsYou must be signed in to change notification settings

FundersClub/business-days

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a handful of functions that make working withbusiness days easier. In this context, "business days" are Monday thru Friday, excludingcertain bank holidays.

importbusiness_days# Simply day manipulation.two_business_days_ago=business_days.days_to_now(timzone.now(),2)# More complex business hour calculations.# Mon 07:00 -> Mon 18:30 (expected: 8 business hours)assertEqual(8*3600,business_days.business_timediff(datetime(2016,10,17,7),datetime(2016,10,17,18,30),).total_seconds())

Seetests.py for more examples.

Note about developing this: If you are going to release a new version, don't forget to tag the release as v0.x.y (or whatever) so that it's easy to refer to specific versions fromrequirements.txt files.

About

Make working with business days less painful

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors5

Languages


[8]ページ先頭

©2009-2025 Movatter.jp