X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=scripts%2Fcocanwiki_date.ml;h=754fac44c22fcb6200d6cab4065be83329e696b5;hb=a9168cad656af034b671c9dea53057845e2196c9;hp=ba42c74099f59f7a457771d9311bf50ff80d5cf7;hpb=714e5e5b4b585da1eca55274e3903ee9a1dbf0d6;p=cocanwiki.git diff --git a/scripts/cocanwiki_date.ml b/scripts/cocanwiki_date.ml index ba42c74..754fac4 100644 --- a/scripts/cocanwiki_date.ml +++ b/scripts/cocanwiki_date.ml @@ -1,7 +1,7 @@ (* COCANWIKI scripts. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: cocanwiki_date.ml,v 1.1 2004/09/07 13:40:10 rich Exp $ + * $Id: cocanwiki_date.ml,v 1.2 2004/09/07 14:58:34 rich Exp $ *) open Apache @@ -9,7 +9,16 @@ open Registry open Cgi open Printf -open Merjisforwiki +let short_weekday = function + | 0 -> "Sun" | 1 -> "Mon" | 2 -> "Tue" | 3 -> "Wed" + | 4 -> "Thu" | 5 -> "Fri" | 6 -> "Sat" | 7 -> "Sun" + | _ -> invalid_arg "short_weekday" + +let short_month = function + | 1 -> "Jan" | 2 -> "Feb" | 3 -> "Mar" | 4 -> "Apr" + | 5 -> "May" | 6 -> "Jun" | 7 -> "Jul" | 8 -> "Aug" + | 9 -> "Sep" | 10 -> "Oct" | 11 -> "Nov" | 12 -> "Dec" + | _ -> invalid_arg "short_month" (* Generate a printable datestamp for pages. *) let printable_date (date, _) =