swh:1:snp:6df5a50b8107b6bbe1e51d0239d816a7503c536a
Raw File
Tip revision: c4e804bbf0c16aa0c2234ea733fba73de28bddaa authored by Junio C Hamano on 20 January 2006, 03:56:27 UTC
GIT 1.1.4
Tip revision: c4e804b
test-date.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;
}
back to top