From 9fa20a160fb1465a0dc25e2df58d784e26b8a80c Mon Sep 17 00:00:00 2001 From: Denis Merigoux Date: Sun, 17 May 2020 19:20:03 +0200 Subject: [PATCH] Correct month --- src/catala/literate/html.ml | 4 ++-- src/catala/literate/latex.ml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/catala/literate/html.ml b/src/catala/literate/html.ml index 98e2bf73..18e2de66 100644 --- a/src/catala/literate/html.ml +++ b/src/catala/literate/html.ml @@ -71,8 +71,8 @@ let wrap_html (code : string) (source_files : string list) (custom_pygments : st let mtime = (Unix.stat filename).Unix.st_mtime in let ltime = Unix.localtime mtime in let ftime = - Printf.sprintf "%d-%02d-%02d, %d:%02d" (1900 + ltime.Unix.tm_year) ltime.Unix.tm_mon - ltime.Unix.tm_mday ltime.Unix.tm_hour ltime.Unix.tm_min + Printf.sprintf "%d-%02d-%02d, %d:%02d" (1900 + ltime.Unix.tm_year) + (ltime.Unix.tm_mon + 1) ltime.Unix.tm_mday ltime.Unix.tm_hour ltime.Unix.tm_min in Printf.sprintf "
  • %s, %s %s
  • " (pre_html (Filename.basename filename)) diff --git a/src/catala/literate/latex.ml b/src/catala/literate/latex.ml index ebf138ae..606a477f 100644 --- a/src/catala/literate/latex.ml +++ b/src/catala/literate/latex.ml @@ -94,8 +94,8 @@ let wrap_latex (code : string) (source_files : string list) (custom_pygments : s let mtime = (Unix.stat filename).Unix.st_mtime in let ltime = Unix.localtime mtime in let ftime = - Printf.sprintf "%d-%02d-%02d, %d:%02d" (1900 + ltime.Unix.tm_year) ltime.Unix.tm_mon - ltime.Unix.tm_mday ltime.Unix.tm_hour ltime.Unix.tm_min + Printf.sprintf "%d-%02d-%02d, %d:%02d" (1900 + ltime.Unix.tm_year) + (ltime.Unix.tm_mon + 1) ltime.Unix.tm_mday ltime.Unix.tm_hour ltime.Unix.tm_min in Printf.sprintf "\\item\\texttt{%s}, %s %s" (pre_latexify (Filename.basename filename))