Changeset 559 in ProjectBuilder for devel/pb/bin/pb
- Timestamp:
- Sep 27, 2008, 6:56:09 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb
r557 r559 718 718 # Instead call News generation 719 719 pb_web_news2html($dest); 720 # And create an empty pbconf 721 pb_mkdir_p("$dest/pbconf"); 720 722 } 721 723 … … 2170 2172 # For date handling 2171 2173 $ENV{LANGUAGE}="C"; 2172 my $firstjan = strftime("%Y-%m-%d", 0, 0, 1, 1, localtime->year(), 0, 0, -1); 2173 my $oldfirst = strftime("%Y-%m-%d", 0, 0, 1, 1, localtime->year()-1, 0, 0, -1); 2174 my $firstjan = strftime("%Y-%m-%d", 0, 0, 0, 1, 0, localtime->year(), 0, 0, -1); 2175 my $oldfirst = strftime("%Y-%m-%d", 0, 0, 0, 1, 0, localtime->year()-1, 0, 0, -1); 2176 pb_log(2,"firstjan: $firstjan, oldfirst: $oldfirst, pbdate:$pbdate\n"); 2174 2177 my $all = $dbh->selectall_arrayref("SELECT id,date,announce FROM announces ORDER BY date DESC"); 2175 2178 my %news; … … 2182 2185 foreach my $row (@$all) { 2183 2186 my ($id, $date, $announce) = @$row; 2184 $news{"cy"} = $news{"cy"}."<p><B>$date</B> $announce\n" if (( "$date" le $pbdate) && ($firstjan le "$date"));2185 $news{"ly"} = $news{"ly"}."<p><B>$date</B> $announce\n" if (( "$date" le $firstjan) && ($oldfirst le "$date"));2186 $news{"py"} = $news{"py"}."<p><B>$date</B> $announce\n" if ( "$date" le $oldfirst);2187 $news{"cy"} = $news{"cy"}."<p><B>$date</B> $announce\n" if ((($date cmp $pbdate) le 0) && (($firstjan cmp $date) le 0)); 2188 $news{"ly"} = $news{"ly"}."<p><B>$date</B> $announce\n" if ((($date cmp $firstjan) le 0) && (($oldfirst cmp $date) le 0)); 2189 $news{"py"} = $news{"py"}."<p><B>$date</B> $announce\n" if (($date cmp $oldfirst) le 0); 2187 2190 $news{"fp"} = $news{"fp"}."<p><B>$date</B> $announce\n" if ($cpt > 0); 2188 2191 $cpt--;
Note:
See TracChangeset
for help on using the changeset viewer.