community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rbo...@apache.org
Subject svn commit: r1869255 - /comdev/tools/birthday.pl
Date Fri, 01 Nov 2019 13:17:43 GMT
Author: rbowen
Date: Fri Nov  1 13:17:43 2019
New Revision: 1869255

URL: http://svn.apache.org/viewvc?rev=1869255&view=rev
Log:
laziness++

Modified:
    comdev/tools/birthday.pl

Modified: comdev/tools/birthday.pl
URL: http://svn.apache.org/viewvc/comdev/tools/birthday.pl?rev=1869255&r1=1869254&r2=1869255&view=diff
==============================================================================
--- comdev/tools/birthday.pl (original)
+++ comdev/tools/birthday.pl Fri Nov  1 13:17:43 2019
@@ -37,7 +37,7 @@ my $res = $ua->request(HTTP::Request->ne
 # print $res->content;
 my $projects = parse_json( $res->content );
 
-
+my $day = 1; my $hour = 9;
 foreach my $p ( @$projects ) {
 
     my $proj = $p->{id};
@@ -53,7 +53,7 @@ foreach my $p ( @$projects ) {
     my $y = ( $d =~ m/(\d\d\d\d)/ )[0];
     my $age = $thisyear - $y;
 
-    print '"01/' . "$month/$thisyear 09:00:00" . '",';
+    print '"' .  sprintf("%02d", $day) . '/' . "$month/$thisyear "  . sprintf("%02s", $hour)
. ':00:00"' . ',';
     print '"';
     print "Happy birthday to " .
             $p->{name} .
@@ -63,7 +63,10 @@ foreach my $p ( @$projects ) {
     print '","';
     print "http://$proj.apache.org/";
     print '"' . "\n";
-
+    $day++;
+    if ( $day > 28 ) {
+        $day = 1; $hour += 6;
+    }
 }
 
 sub usage {



Mime
View raw message