![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Nov 2006
Posts: 1
Rep Power: 0
![]() |
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, |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |