Display birthday on profile as 'Mon DD' or 'Mon DD, YYYY' instead of 
the confusing 'MM-DD'.

        Patch by kareila. 

diffs (21 lines):

diff -r 1c97618605a6 -r 21c6be8bb177 cgi-bin/DW/Logic/ProfilePage.pm
--- a/cgi-bin/DW/Logic/ProfilePage.pm   Sun May 10 05:58:55 2009 +0000
+++ b/cgi-bin/DW/Logic/ProfilePage.pm   Sun May 10 06:13:37 2009 +0000
@@ -377,7 +377,16 @@ sub _basic_info_birthday {
         my $bdate = $u->prop( 'bdate' );
         if ( $bdate && $bdate ne "0000-00-00" ) {
             $ret->[0] = LJ::Lang::ml( '.label.birthdate' );
-            $ret->[1] = $u->bday_string;
+            my ($year, $mon, $day) = split /-/, $bdate;
+            my $moname = LJ::Lang::month_short_ml( $mon );
+            $day += 0;
+            if ( $u->bday_string =~ /\d+-\d+-\d+/ ) {
+                $ret->[1] = "$moname $day, $year";
+            } elsif ( $u->bday_string =~ /\d+-\d+/ ) {
+                $ret->[1] = "$moname $day";
+            } else {
+                $ret->[1] = $u->bday_string;
+            }
         }
     }
 
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to