diff --git a/README b/README index f2268ba..ec2d1b7 100644 --- a/README +++ b/README @@ -1 +1,5 @@ UwU + +Requirements: +- calendar +- ISO8601 diff --git a/src/dune b/src/dune index dcbb772..5fb4f49 100644 --- a/src/dune +++ b/src/dune @@ -1,3 +1,3 @@ (executable (name webcc) - (libraries omd)) + (libraries omd ISO8601)) diff --git a/src/webcc.ml b/src/webcc.ml index 95dae42..1e1506c 100644 --- a/src/webcc.ml +++ b/src/webcc.ml @@ -77,10 +77,11 @@ let process ic oc = | None -> "-" in let md = Omd.of_channel ic in + let date = ISO8601.Permissive.date (lookup_metadata "date") in let html = format_post ~title:(lookup_metadata "title") ~tags:(lookup_metadata "tags") - ~date:(lookup_metadata "date") + ~date:(ISO8601.Permissive.string_of_date date) ~contents:(Omd.to_html md) in output_string oc html