Guest_imported
New member
- Jan 1, 1970
- 0
My program in C needs to verify the validity
of input dates. For example, if the user
inputs February 33, the program should spot
this as invalid. I know Linux can do a lot
with dates. For example, the cal command can
produce any year's calander. So there must be
an easy way to do this.
I know how to get the current data/time with
ctime() no problem. It's just past and future
valid dates I have a problem with.
Also, in another part of this program, it has
to produce dates corresponding to the following
strings: Yesterday, Today, Tomorrow, Today + 2
Anybody got any ideas how I can do this in C ?
of input dates. For example, if the user
inputs February 33, the program should spot
this as invalid. I know Linux can do a lot
with dates. For example, the cal command can
produce any year's calander. So there must be
an easy way to do this.
I know how to get the current data/time with
ctime() no problem. It's just past and future
valid dates I have a problem with.
Also, in another part of this program, it has
to produce dates corresponding to the following
strings: Yesterday, Today, Tomorrow, Today + 2
Anybody got any ideas how I can do this in C ?