Important alert: (current site time 7/15/2013 4:56:07 PM EDT)
 

winzip icon

_Useful and easy time and date class

Email
Submitted on: 3/27/2002 8:21:20 PM
By: Matt Guidry 
Level: Intermediate
User Rating: By 9 Users
Compatibility: Microsoft Visual C++, Borland C++
Views: 20469
author picture
(About the author)
 
     This declares an easy to use time and date class with built in functions to generate string outputs of time and dates. It has a built in stopwatch, which doesnt work w/ borland and should be commented out. It has an example program which demonstrates the basic use of the class. (again, make sure to comment out the stopwatch section for borland users, it DOES work with MVC++)

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 3 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
5/7/2002 3:24:13 PMAD

This is just the code I've been looking for! I didn't know how to create functions to call the current time and date or to calculate time in between. Thanks!
(If this comment was disrespectful, please report it.)

 
3/30/2003 9:50:05 AM

It is excellent code I was wondering for couple of week f=to find this code.
(If this comment was disrespectful, please report it.)

 
4/23/2003 9:48:24 PMNDawg

First off, this is great code... exactly what I have been looking for!

A couple of questions though.

1.) I converted your code to use the msvc 6.0 standard library string data types. Would you like a copy of the converted code?

2.) I was looking at your IntToString function and noticed it could use a little work. Was it your intent to only allow 1,2, and 4 digit number inputs? If not, I also changed that portion.

Let me know if you want my version.
(If this comment was disrespectful, please report it.)

 
4/25/2003 7:28:09 PMMatt Guidry

I'd love an updated copy of the code. One reason I didn't like my c++ book was that it never used the standard string data type, only it's own library.

About the IntToString function, it's been quite a while since I wrote it, but I'm pretty sure I intended it that way, since it would only need to output numbers of that length.
(If this comment was disrespectful, please report it.)

 
4/6/2004 2:40:01 PM

hi man im very thx to u on this prog. on c++
im used this in my universuty in jordan
agin thxthx .......man:)
(If this comment was disrespectful, please report it.)

 
3/2/2005 9:30:52 PM

This program is great, itīs a clear example of usefull routines of time!!!
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.