;;; This file contains the main canevas of each pages.
;;; License GPL.
;;; Authors: Arnaud Legrand, Martin Quinson, Vincent Danjean

;;; Définition de fonctions perl utilitaires

{#PERL_DEF#:
#use wml::std::tags

<perl>
sub isotitlestring {
  my ($str) = @_;

  $str =~ s/ /_/g;
  $str =~ s/(\S)/$1~/g;
  $str =~ s/_/ /g;
  $str =~ s/ / /g;
  $str =~ s/~/ /g;
  return $str;
}

sub isotime {
  my ($time) = @_;

  my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime($time);
  my ($str) = sprintf("%04d-%02d-%02d %02d:%02d:%02d",
                      $year+1900, $mon+1, $mday, $hour, $min, $sec);
  return $str;
}
</perl>

:#PERL_DEF#}