1 (* Example program which uses Date::Parse.
2 * Copyright (C) 2003 Merjis Ltd.
3 * $Id: parsedate.ml,v 1.1 2003-11-19 16:28:22 rich Exp $
12 (* Parse dates passed on the command line. *)
13 if Array.length Sys.argv <= 1 then
14 eprintf "parsedate [list of quoted date strings ...]\n"
16 let strings = List.tl (Array.to_list Sys.argv) in
18 printf "input string = '%s' ->\n" s;
20 printf "\ttime_t = %f\n" t;
22 printf "\tconverted back to string = %s\n" s;
27 (* Destroy the Perl interpreter. *)
28 Perl.destroy (Perl.current_interpreter ());
30 (* Perform a full collection - good way to find GC/allocation bugs. *)