Newsgroups: comp.text.tex Date: 2000/03/19
> The date is formatted in latex2html.bat (for windows version 99.2beta6)
Problem is I run it under Linux!!
> To change the date format look for the lines: > # Author address > @address data = &address data('ISO'); > > Get rid of 'ISO' on the second line to read > # Author address > @address data = &address data(); > > This change gives the American date format mm/dd/yyyy. > To change this find the subroutine: > sub get date { > > and at the end change the line > > } else { sprintf("%d/%d/%d", $m+1, $d, 1900+$y); } to > } else { sprintf("%d/%d/%d", $d, $m+1, 1900+$y); } > > You can also change the / in this line if you wish.
That sounds good but the problem is I don't have these subroutines in my latex2html.config file, and i don't know in which file they are on this system.
> There's an interesting discussion of this issue at > http://www.xray.mpe.mpg.de/mailing-lists/latex2html/1997-08/msg00100.ht[] ml > and you'll probably be able to use it to come up with a better solution .
Same thing there, it doens't specify where to find these subroutines.
I soved the problem (maybe not in the best way) by using a regular expression on the variable that gives the date in yyyy-mm-dd in my latex2html.config :
$address data[1]=~s/(.*)-(.*)-(.*)/$3-$2-$1/; $ADDRESS = "<I>Derni?e modification : $address data[1]</I>";
and it does just what i want! Thanks anyway,
Jean-Marc Lecarpentier
>and it does just what i want!
Wonderful! I copied your code into my Windows .latex2html-init file and it worked well. It's a lot better than altering config or bat files and is easily changeable for any situation
Steve Mayer
It won't work for latex2html 2002. The following did the trick.
$ diff -wu /usr/share/latex2html/styles/english.perl~ /usr/share/latex2html/styles/english.perl --- /usr/share/latex2html/styles/english.perl~ 2003-02-18 22:13:01.000000000 -0500 +++ /usr/share/latex2html/styles/english.perl 2004-01-28 21:07:52.000000000 -0500 @@ -62,7 +62,7 @@
sub english_today { local($today) = &get_date(); - $today =~ s|(\d+)/0?(\d+)/|$2 $Month[$1] |; + $today =~ s|(\d+)/0?(\d+)/|$Month[$1] $2, |; join('',$today,$_[0]); }