calculate the remaining time

Oct 24, 2010 at 4:21pm
hi i need the function which can say how much time remain to the last date.

the last date is input,i mean the last date is given to code by user,and this function calculate

the last date - today date = ?

my english isnt good enough.i hope u can understand me.
Last edited on Oct 24, 2010 at 4:23pm
Oct 24, 2010 at 4:35pm
Unless you want to do it manually, you need a DateTime class.
The following Boost.Date_Time example is exactly what you need:
http://www.boost.org/doc/libs/1_44_0/doc/html/date_time/examples.html#date_time.examples.days_alive

Documentation:
http://www.boost.org/doc/libs/1_44_0/doc/html/date_time.html
Oct 24, 2010 at 5:03pm
thank you but i cant understand this functions.

which function can help me?
Topic archived. No new replies allowed.