diff options
author | Yorhel <git@yorhel.nl> | 2009-09-26 12:02:29 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-09-26 12:02:29 +0200 |
commit | af9f6b31f054f3bdec55fb161846d25aed2687af (patch) | |
tree | 550e2aaf74044810307414621fff555fcf5f551e /lib/Multi/RG.pm | |
parent | b7fbaa1fbce414dfbab49f6d5ae0e9eaf882d45e (diff) |
Display full release dates in relation graphs
Interface consistency
Diffstat (limited to 'lib/Multi/RG.pm')
-rw-r--r-- | lib/Multi/RG.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Multi/RG.pm b/lib/Multi/RG.pm index be12fd17..52f737c5 100644 --- a/lib/Multi/RG.pm +++ b/lib/Multi/RG.pm @@ -113,7 +113,12 @@ sub builddot { # num, res # insert all nodes, ordered by release date for (sort { $a->{date} <=> $b->{date} } @$vns) { my $date = sprintf '%08d', $_->{date}; - $date =~ s#^([0-9]{4})([0-9]{2}).+#$1==0?'N/A':$1==9999?'TBA':(($2&&$2<13?($_[HEAP]{moy}[$2-1].' '):'').$1)#e; + $date =~ s{^([0-9]{4})([0-9]{2})([0-9]{2})$}{ + $1 == 0 ? 'unknown' + : $1 == 9999 ? 'TBA' + : $2 == 99 ? $1 + : $3 == 99 ? "$1-$2" : "$1-$2-$3" + }e; my $title = $_->{title}; $title = substr($title, 0, 27).'...' if length($title) > 30; |