On 2021-08-18 20:57, Bruno Lirio wrote:
Em sábado, 14 de março de 2009 às 13:59:41 UTC-3, Casey escreveu:
How about:
from datetime import date, timedelta
# Define the weekday mnemonics to match the date.weekday function
(MON, TUE, WED, THU, FRI, SAT, SUN) = range(7)
def workdays(start_date, end_
Em sábado, 14 de março de 2009 às 13:59:41 UTC-3, Casey escreveu:
> How about:
> from datetime import date, timedelta
> # Define the weekday mnemonics to match the date.weekday function
> (MON, TUE, WED, THU, FRI, SAT, SUN) = range(7)
> def workdays(start_date, end_date, whichdays=(MON,TUE,WED,THU,
How about:
from datetime import date, timedelta
# Define the weekday mnemonics to match the date.weekday function
(MON, TUE, WED, THU, FRI, SAT, SUN) = range(7)
def workdays(start_date, end_date, whichdays=(MON,TUE,WED,THU,FRI)):
'''
Calculate the number of working days between two dates
On Mar 15, 12:13 am, Gonsolo wrote:
> I found no solution on the net so I am posting my solution here.
> It can be called with "python cwd 1-1-2009 14-3-2009"
>
> from dateutil.rrule import *
> from dateutil.parser import *
> from datetime import *
> from sys import *
H ... I wonder what the
I found no solution on the net so I am posting my solution here.
It can be called with "python cwd 1-1-2009 14-3-2009"
from dateutil.rrule import *
from dateutil.parser import *
from datetime import *
from sys import *
start = parse( argv[1] )
#end = datetime.now()
end = parse( argv[2] )
workday