Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Nov 2nd, 2006, 11:05 PM   #1
srinivasc_it
Newbie
 
Join Date: Nov 2006
Posts: 1
Rep Power: 0 srinivasc_it is on a distinguished road
caluculate day of week given present date and number of days

Hi,

I need to write a function in c++ that calculates expiry date of inventory, based on received date and warranty period.

so inputs to function are:-
Date recieved = "10/31/2005" (string)
Warranty period (num of days)= 30 (long)

so output should be "11/29/2005" (string)

i.e "10/31/2005" + 30 days = "11/29/2005"
similarly, 12/31/2005 + 7 days = 01/06/2006
09/11/2005 + 30 days = 10/10/2005
10/31/2005 + 90 days = 01/28/2006


string calculate_expiry_date(string date_recieved, long warranty_period)
{
string date_expire;


return date_expire;
}

Can any one please tell me the logic, are direct me to a web link, were I can find code for this logic from scratch in c++, C or Java or any other link that helps me to develop this.

Are there any c++ libraries available for this caluculation?

Thanks,
srinivasc_it is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
converting string to float beginnerCCC C 22 Oct 3rd, 2006 12:59 AM
[tutorial] Python for programming beginners coldDeath Python 30 Dec 14th, 2005 12:35 PM
Median/Mode in arrays? {Need help} Java|Tera Java 27 Nov 29th, 2005 11:50 AM
Getting Start Date of Week Automatik C# 2 Jul 20th, 2005 5:20 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:38 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC