#!/afs/athena/contrib/perl/p

%month = ("Jan", 0,
          "Feb", 31,
          "Mar", 59,
          "Apr", 90,
          "May", 120,
          "Jun", 151,
          "Jul", 181,
          "Aug", 212,
          "Sep", 243,
          "Oct", 273,
          "Nov", 304,
          "Dec", 334);

$|=1;
while(<>){
    ($host, $x, $x, $datestr, @blah) = split;
    $datestr =~ s/[\[\]]//g;
    ($day, $mon, @blah) = split("\/", $datestr);
#    print("0: $_[1], 1: $_[2], 2: $_[3]..\n");
#    $day[$month{$_[2]} + $_[3]] = $_[1];
    print("At $mon ", $day-1, ": ", $day[$month{$mon}+$day-1]), "\n\n" if $day[$month{$mon} + $day]==0;

	  print("\n$mon $day\n") if $day[$month{$mon} + $day]%2500 == 0;
    $day[$month{$mon} + $day]++;
}

for $d (0..365){
    $thisweek +=$day[$d];
    $week++;
#    $ticks = '-' x ($day[$d]/100); 
#    print("$d: $ticks ($day[$d])\n");
    if($week == 7){
	$ticks = '-' x ($thisweek/500); 
	print("$d $thisweek\n");
	$week = 0;
	$thisweek = 0;
    }
}
