Date: Wed, 14 Mar 2001 22:29:08 +0200 From: =?iso-8859-9?B?RXJ0YW4gS/zn/Gtv8Gx1?= <ertank@softhome.net> To: <questions@freebsd.org> Subject: date time with C (off topic) Message-ID: <000701c0acc5$73eb9e50$5720fdd4@greenkey>
next in thread | raw e-mail | index | archive | help
Hi, I'm trying to write a little C program (not c++). I want to calculate the next day. I have year, month and day values as integer as seperate variables. I'm not talking about the day that program runs. It is a prior date. I get it from a file. I do not have good C knowledge. I thought I just can convert the date value I have to seconds since 1.1.1970. After that I can add seconds for one day to the converted date value. But, I couldn't do because I couldn't manage how to calculate leap years. How can I do that calculation correctly? Or, is there a simpler way to do that? Or, a sample source code? Or something? Regards, -- Ertan Kucukoglu ertank@softhome.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000701c0acc5$73eb9e50$5720fdd4>