/** DATEMATH - Demonstration program that shows how to do date mathematics by utilizing Unix procedures. This is missing some error checking, etc., but will show how to do "+n" and "-n" date math well enough. (C) Copyright 2005 by Dave Taylor. Free to redistribute if this copyright is left intact. Thanks. ***/ #include #include time_t time(time_t *tloc); char *ctime(const time_t *clock); main(int argc, char **argv) { time_t theTime; if (argc > 1) theTime = atoi(argv[1]); printf("%s\n", ctime(&theTime)); }