X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=scripts%2Fstats.ml;h=f9b2b2ad69c606a070746bd88343f089164f3007;hb=e828b148d6338765d7f5ca8f10567d5d9ef00548;hp=1369474c1dab77903a67dde4a0059cea54b58444;hpb=ae2b49ecd15143bb99835f227a08fc49d35f59b9;p=cocanwiki.git diff --git a/scripts/stats.ml b/scripts/stats.ml index 1369474..f9b2b2a 100644 --- a/scripts/stats.ml +++ b/scripts/stats.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: stats.ml,v 1.3 2004/10/23 16:34:58 rich Exp $ + * $Id: stats.ml,v 1.4 2005/04/02 17:30:54 rich Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,8 +24,6 @@ open Registry open Cgi open Printf -open GregorianDate - open Cocanwiki open Cocanwiki_template open Cocanwiki_server_settings @@ -48,10 +46,10 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid let year, week = let date = let tm = Unix.gmtime (Unix.time ()) in - (tm.Unix.tm_year + 1900, tm.Unix.tm_mon + 1, tm.Unix.tm_mday) + Date.make (tm.Unix.tm_year + 1900) (tm.Unix.tm_mon + 1) tm.Unix.tm_mday in - fst (GregorianDate.business_of_standard date) - in + let year, week, _ = Date.to_business date in + year, week in template#set "year" (string_of_int year); template#set "week" (string_of_int week);