By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,778 Members | 1,997 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,778 IT Pros & Developers. It's quick & easy.

time and date functions

P: n/a
Hi there,
Can anyone tell me if there is any time and date standard functions
for C++ and, if so, were can I find documentation about it? If such
functions do not exist, any hint of what library should I use?

cheers

Luis Pedro

Jul 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Luis Pedro" <__luis.pedro_@_cern.ch__> wrote...
Can anyone tell me if there is any time and date standard functions
for C++ and, if so, were can I find documentation about it?
Time functions in C++ are from the C Standard Library, so any
book on C should contain the information. Names of the functions
are 'time', 'gmtime', 'localtime', 'asctime', 'clock', 'difftime',
'mktime' (from memory). Am I fogetting any?
If such
functions do not exist, any hint of what library should I use?


Depending on the functionality you need. If you're looking for
some kind of wrapper similar to TDate from Borland or whatever,
you should look at the "Available C++ Libraries FAQ" posted here
about monthly by Nikki Locke.

Victor
Jul 22 '05 #2

P: n/a
Hi Victor,
Thanks for your help. I'm already using the C Standard library for
this (e.g. ctime()). My question was more if there was any C++ library
equivalent to the C one, regarding the time and date stuff.

cheers

Luis Pedro
Victor Bazarov wrote:
"Luis Pedro" <__luis.pedro_@_cern.ch__> wrote...
Can anyone tell me if there is any time and date standard functions
for C++ and, if so, were can I find documentation about it?

Time functions in C++ are from the C Standard Library, so any
book on C should contain the information. Names of the functions
are 'time', 'gmtime', 'localtime', 'asctime', 'clock', 'difftime',
'mktime' (from memory). Am I fogetting any?

If such
functions do not exist, any hint of what library should I use?

Depending on the functionality you need. If you're looking for
some kind of wrapper similar to TDate from Borland or whatever,
you should look at the "Available C++ Libraries FAQ" posted here
about monthly by Nikki Locke.

Victor


Jul 22 '05 #3

P: n/a
"Luis Pedro" <__luis.pedro_@_cern.ch__> wrote in message
news:bp**********@sunnews.cern.ch...
Hi Victor,
Thanks for your help. I'm already using the C Standard library for
this (e.g. ctime()). My question was more if there was any C++ library
equivalent to the C one, regarding the time and date stuff.


The C++ standard library, by definition, includes the
(C90) standard library. So, e.g. 'time()' etc. *are*
C++ standard library functions.

-Mike
Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.