473,399 Members | 3,656 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Calculating days using Business Days for the Calendar

I''m wondering if the Calendar object has an option to only do calculations
based on business days (ie M-F). Additionally does it have a way to get
holidays into itself?

Currently I'm considering converting my calculations over to business days
and am wondering if there is anything built-in. I've tried searching but so
far haven't seen such a thing built in.

I'm thinking I'm just going to have to bite the bullet and create my own
approach to
1) figure out the day of the week of my starting date (Calendar.weekday()
should do the trick)
2) determine the number of days up to my finish date (i do that now)
3) determine the number of non-business days (weekends + holidays)
4) subtract off the number in #3 from #2
David
-------
Surf a wave to the future with a free tracfone
http://cellphone.duneram.com/index.html

__________________________________________________ _______________
FREE pop-up blocking with the new MSN Toolbar – get it now!
http://toolbar.msn.click-url.com/go/...ave/direct/01/

Jul 18 '05 #1
1 4235
David Stockwell wrote:
I''m wondering if the Calendar object has an option to only do
calculations based on business days (ie M-F). Additionally does it have
a way to get holidays into itself?

Currently I'm considering converting my calculations over to business
days and am wondering if there is anything built-in. I've tried
searching but so far haven't seen such a thing built in.

I'm thinking I'm just going to have to bite the bullet and create my own
approach to
1) figure out the day of the week of my starting date
(Calendar.weekday() should do the trick)
2) determine the number of days up to my finish date (i do that now)
3) determine the number of non-business days (weekends + holidays)
4) subtract off the number in #3 from #2
David
-------
Surf a wave to the future with a free tracfone
http://cellphone.duneram.com/index.html

.... ReportLab's version of jeff Bauer's normalDate module has a BusinessDate
object which does businessday diffs etc etc.

--
Robin Becker
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: John | last post by:
hey all..... alright, I am frusterated to the point of throwing my machine out the window (this board went down, trying to find stuff on google, this has been a nightmare) so I hope you guys can...
12
by: Anthony Robinson | last post by:
Is anyone aware of a function (system or user defined) that will calculate business days? For instance: I have a column in as table called DATE. I want to be able to add five business days to that...
5
by: BlackFireNova | last post by:
I need to write a report in which one part shows a count of how many total records fall within the working days (Monday - Friday) inside of a (prompted) given date range, in a particular...
1
by: Norman Fritag | last post by:
Hi there I have avoided to use active x controls because I thought they are causing more problems then they are doing any good. I a new application I would want to use the tree and list view...
2
by: celsius | last post by:
Hi folks, Al Bowers wrote this program on comp.lang.c Date: 2001-07-09 13:41:58 PST #include <stdio.h> int isleap (unsigned yr); static unsigned months_to_days (unsigned month); static long...
7
by: Sam | last post by:
Hi, I use C# in my ASP.NET projects. Here's what I need to do: I want to add x business days to a given date i.e. add 12 business days to today's date. What is the best, fastest and most...
1
by: keithsimpson3973 | last post by:
I have a scheduling application written in VB 6. I have code that writes an event to the Microsoft Office Outlook Calendar. I need to set the timer on the calendar event to notify 3 days later. The...
8
by: =?Utf-8?B?QWw=?= | last post by:
I am working in vb2005. how can I calculate business days (not including holidays and weekends) between 2 dates? thanks Al
1
by: trixxnixon | last post by:
Hi all, I have been handed a new project that required me to update a database... a rather complicated database. I take that back, its not that it is super complicated, I am just a novice user...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.