Workdays between two dates

Log in to Vote
13
13 Votes • 17 Comments
Exactly like "days between 01/01/2014 01/08/2014", but only count the workdays (Monday through Friday):
"workdays between 01/01/2014 01/08/2014"

Useful for work :)
• posted 4 years and 1 month ago In Development

ScreapDK
Thanks! That is a lovely idea! : D I think it also would also be useful to get an idea of, when a package arrives in the mail, e.g. if it takes 15 workdays. : )
posted by ScreapDK Community Leader4 years and 1 month ago Link
Rllx
I hadn't even thought of that use for this !bang. This makes it even more useful.
posted by Rllx 4 years and 1 month ago Link
mgarriott
I'd like to work on implementing this, but I have a few usability questions.

Should answers take holidays into account?

Should the start and/or end date be included in the answer, i.e. should "workdays between 1/6/2014 1/10/2014" return 3, 4, or 5 days?
posted by mgarriott 4 years and 1 month ago Link
crazedpsyc
Either way, I think it should clarify that in the answer, e.g. "5 days (including start and end)"
Even better, show a calendar with the range hilighted?
posted by crazedpsyc 4 years and 1 month ago Link
ScreapDK
Quote:
Either way, I think it should clarify that in the answer, e.g. "5 days (including start and end)"

Yes! Great idea! : ) This should prevent most misunderstandings. : )

Quote:
Even better, show a calendar with the range hilighted?

Great idea, too! This would really nice as well. : )
posted by ScreapDK Community Leader4 years and 1 month ago Link
ScreapDK
Interesting thoughts! : )
I think holidays should be equal to weekends. I.e. holidays doesn't count as workdays.

I think it should include both the start date and end date, unless told not to. E.g. "workdays between 1/6/2014 1/10/2014" returns "5", and "workdays between 1/6/2014 1/10/2014 both exclusive" returns "3".

Please note, I'm not a native English speaker, so the "both exclusive" is just a loose translation. : )
posted by ScreapDK Community Leader4 years and 1 month ago Link
ScreapDK
P.S. What does peoples think: Should it be "both inclusive" or "both exclusive" by default?
posted by ScreapDK Community Leader4 years and 1 month ago Link
This comment has been removed for violation of our forum rules.
posted by <hidden> • 4 years and 1 month ago
mgarriott
Alright, I've got a pretty clear picture of what I need to implement for the inclusive / exclusive dates.

As it stands my plan is to:

Use inclusive by default (as suggested by ScreapDK) with 'exclusive' specifying that neither the start nor end date will be included.

Be very clear about the date inclusion in the returned answer. And possibly, depending on difficulty level, including a calender with the highlighted days.

However, I still need some additional clarification on the holiday part.

The big question in my mind is, what determines a holiday? Should we just use Bank Holidays, or National Holidays? How should this work for other people in other countries?

I like the idea of supporting holidays, but the more I think about it, the more complex it seems to become. Does anyone have any thoughts on this issue?
posted by mgarriott 4 years and 1 month ago Link
anonymous
nice idea i too would like to work on this
posted by <hidden> • 4 years and 1 month ago Link
mgarriott
I really appreciate the offer, but I don't think this is a big enough change for more than a single developer.

But thank you for the offer!
posted by mgarriott 4 years and 1 month ago Link
TV
Do you have any source to provide, I could give a try on this one.
posted by TV 4 years and 1 month ago Link
mgarriott
I'm pretty well done with this one now, and I'll be posting the PR soon. Thanks for the offer though!
posted by mgarriott 4 years and 1 month ago Link
TV
Okay man gl
posted by TV 4 years and 1 month ago Link
mgarriott
posted by mgarriott 4 years and 1 month ago Link
Jag
Changing to "In Development."
posted by Jag Staff4 years and 1 month ago Link
Rllx
Whow that was fast! Awesome, guys. I'm looking forward to using it. Thanks in advance.
posted by Rllx 4 years and 1 month ago Link