]> the.earth.li Git - htag.git/blobdiff - plugins/09date
Import Upstream version 0.0.23
[htag.git] / plugins / 09date
index d62eaf997acf1f8e4499aaf7de7012d0c41324bd..decdf26718a9003f6d05473ad5f81ceaa7ea4c3d 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 
-# Copyright (C) 2000-2001 Simon Huggins
+# Copyright (C) 2000-2003 Simon Huggins
 # date just calls date.  You may pass in a strftime compatible formatting
 # string.
 
@@ -35,8 +35,10 @@ reg_deletion("$cfg{'tmpdir'}/D");
 foreach my $f (@found) {
        my @f = @{$f};
        my $date = strftime($cfg{'date_format'} ? $cfg{'date_format'} : "%a %b %e %H:%M:%S %Y", localtime);
-       if (length $date <= $f[1]) {
-               print OUT chunksizealign($date, $f[1], $f[2]);
+       if ($f[1] eq "*") {
+               print OUT $date,"\n";
+       } elsif (length $date <= $f[1]) {
+               print OUT chunksizealign($date, $f[1], $f[2]),"\n";
        } else {
                my $diemsg = "Can't fit your chosen date format (";
                if (defined $cfg{'date_format'}) {