1
0
mirror of https://github.com/git/git.git synced 2024-11-18 06:13:55 +01:00
git/test-date.c
Junio C Hamano f30c95dd76 Add approxidate test calls.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-16 23:54:37 -08:00

24 lines
416 B
C

#include <stdio.h>
#include <time.h>
#include "cache.h"
int main(int argc, char **argv)
{
int i;
for (i = 1; i < argc; i++) {
char result[100];
time_t t;
memcpy(result, "bad", 4);
parse_date(argv[i], result, sizeof(result));
t = strtoul(result, NULL, 0);
printf("%s -> %s -> %s", argv[i], result, ctime(&t));
t = approxidate(argv[i]);
printf("%s -> %s\n", argv[i], ctime(&t));
}
return 0;
}