logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: xmltv-commit digest, Vol 1 #270 - 2 msgs: msg#00105

Subject: Re: xmltv-commit digest, Vol 1 #270 - 2 msgs
On Fri, 24 Jan 2003 xmltv-commit-request@xxxxxxxxxxxxxxxxxxxxx wrote:

>Modified Files:
>       tv_check 
>Log Message:
>added --DDMM switch to optinally use that date format in reports

>+ #
>+ # quick routine for mmdd->ddmm for our users across the pond
>+ #
>+ sub mmdd_swap
>+ {
>+     if ($DDMM)
>+     {
>+         my $mm=substr($_[0],0,2);
>+         my $dd=substr($_[0],2,2);
>+         return $dd.$mm;
>+     }
>+     return $_[0];
>  }

Couldn't you generalize this by passing in a date(1) style
string?  As in --format %y-%m-%d or whatever.  Hmm, if you are not
already using Date::Manip it might not be completely easy.  But I
still think it is better than one-off options like --ddmm.

Second, perhaps it would be best to adopt the international standard
(ISO 8601) to display dates.  That is yyyy-mm-dd.  Of course the other
options can still be available, but the international standard should
be the default.  (To a European it will be less familiar than
European dates, and to an American less familiar than the American
format, but at least there is not the same potential for getting
confused between the two.)

(OK, I know that currently tv_to_latex uses just mm-dd but I will
change it to ISO 8601 next time I start coding.)

-- 
Ed Avis <ed@xxxxxxxxxxx>







<Prev in Thread] Current Thread [Next in Thread>