Improved patch to make month names lowercase when the selected format is day before month
Index: cgi-bin/yabb2/Languages/English/Main.lng
===================================================================
--- cgi-bin/yabb2/Languages/English/Main.lng (revision 1511)
+++ cgi-bin/yabb2/Languages/English/Main.lng (working copy)
@@ -18,6 +18,7 @@
@days = ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
@months = ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
+@months_m = ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
@days_short = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); # for smtp
%maintxt = (
@@ -129,6 +130,8 @@
'758' => 'Moved',
'769' => 'Today',
'769a'=> 'Yesterday',
+'770' => '', #month suffix for January 1.
+'770a' => '', #month suffix for 1. January
'773' => 'Would you like to print this page now?',
'900b' => 'Back',
'900s' => 'Submit',
Index: cgi-bin/yabb2/Sources/DateTime.pm
===================================================================
--- cgi-bin/yabb2/Sources/DateTime.pm (revision 1511)
+++ cgi-bin/yabb2/Sources/DateTime.pm (working copy)
@@ -205,7 +205,7 @@
$newmonth = sprintf '%02d', $newmonth;
$newshortyear = ( $newyear % 100 );
$newshortyear = sprintf '%02d', $newshortyear;
- if ( $mytimeselected != 4 && $mytimeselected != 8 ) {
+ if ( $mytimeselected != 4 && $mytimeselected != 6 && $mytimeselected != 8 ) {
$newday = sprintf '%02d', $newday;
}
$newhour = sprintf '%02d', $newhour;
@@ -465,7 +465,7 @@
$ampm = $newhour > 11 ? 'pm' : 'am';
$newhour2 = $newhour % 12 || 12;
if ($use_rfc) { $newmonth2 = $months_rfc[ $newmonth - 1 ]; }
- else { $newmonth2 = $months[ $newmonth - 1 ]; }
+ else { $newmonth2 = $months_m[ $newmonth - 1 ]; }
$newday2 = "$timetxt{'4'}";
if ( $newday > 10 && $newday < 20 ) {
$newday2 = "$timetxt{'4'}";
@@ -481,13 +481,13 @@
$newformat =
$daytxt
? qq~$daytxt $maintxt{'107'} $newhour2:$newminute$ampm~
- : qq~$newmonth2 $newday$newday2, $newyear $maintxt{'107'} $newhour2:$newminute$ampm~;
+ : qq~$newmonth2$maintxt{'770'} $newday$newday2, $newyear $maintxt{'107'} $newhour2:$newminute$ampm~;
}
else {
$newformat =
$daytxt
? qq~$daytxt $maintxt{'107'} $newhour2:$newminute$ampm~
- : qq~$newday$newday2 $newmonth2, $newyear $maintxt{'107'} $newhour2:$newminute$ampm~;
+ : qq~$newday$newday2 $newmonth2$maintxt{'770a'}, $newyear $maintxt{'107'} $newhour2:$newminute$ampm~;
}
return $newformat;
@@ -508,11 +508,11 @@
sub time_6 {
my ( $daytxt, $newday, $newmonth, $newyear, $newhour, $newminute ) = @_;
if ($use_rfc) { $newmonth2 = $months_rfc[ $newmonth - 1 ]; }
- else { $newmonth2 = $months[ $newmonth - 1 ]; }
+ else { $newmonth2 = $months_m[ $newmonth - 1 ]; }
$newformat =
$daytxt
? qq~$daytxt $maintxt{'107'} $newhour:$newminute~
- : qq~$newday. $newmonth2 $newyear $maintxt{'107'} $newhour:$newminute~;
+ : qq~$newday. $newmonth2$maintxt{'770a'} $newyear $maintxt{'107'} $newhour:$newminute~;
return $newformat;
}
@@ -591,7 +591,7 @@
$ampm = $newhour > 11 ? 'pm' : 'am';
$newhour2 = $newhour % 12 || 12;
if ($use_rfc) { $newmonth2 = $months_rfc[ $newmonth - 1 ]; }
- else { $newmonth2 = $months[ $newmonth - 1 ]; }
+ else { $newmonth2 = $months_m[ $newmonth - 1 ]; }
$newday2 = "$timetxt{'4'}";
if ( $newday > 10 && $newday < 20 ) {
$newday2 = "$timetxt{'4'}";
@@ -606,7 +606,7 @@
$newformat =
$daytxt
? qq~$daytxt $maintxt{'107'} $newhour2:$newminute$ampm~
- : qq~$newday$newday2 $newmonth2, $newyear $maintxt{'107'} $newhour2:$newminute$ampm~;
+ : qq~$newday$newday2 $newmonth2$maintxt{'770a'}, $newyear $maintxt{'107'} $newhour2:$newminute$ampm~;
return $newformat;
}
I will include the Finnish version of @months_m in the next version of the Finnish language packs.