Added format.month to move the day before the month
authorTim Pope <code@tpope.net>
Wed, 9 Feb 2005 03:53:11 +0000 (03:53 +0000)
committerTim Pope <code@tpope.net>
Wed, 9 Feb 2005 03:53:11 +0000 (03:53 +0000)
mlastyle.bst

index 73210a8d5301d1d84be505fc378069230e3a91d6..1e4136742047f81a674159569e7946188409c908 100644 (file)
@@ -1,4 +1,4 @@
-% $Id: mlastyle.bst,v 1.19 2005-02-08 15:13:47 tpope Exp $
+% $Id: mlastyle.bst,v 1.20 2005-02-09 03:53:11 tpope Exp $
 % BibTeX bibliography style `mlastyle'
 % Based on BibTeX standard bibliography style `plain'
        % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
 % BibTeX bibliography style `mlastyle'
 % Based on BibTeX standard bibliography style `plain'
        % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
@@ -515,18 +515,48 @@ FUNCTION {format.year}
   if$
 }
 
   if$
 }
 
+FUNCTION {format.month}
+{
+  month #-1 #1 substring$ chr.to.int$ duplicate$ #47 > swap$ #58 < and
+    { 
+      month #-2 #1 substring$ chr.to.int$ duplicate$ #47 > swap$ #58 < and
+        { #2 'i := }
+       { #1 'i := }
+      if$
+      month #-2 i - #2 substring$ "\ " =
+        { month #0 i - i substring$
+         month #-2 i - #2 substring$
+         month #-3 i - global.max$ i - #2 - substring$
+         * *
+       }
+       {
+         month #-1 i - #1 substring$ duplicate$ " " = swap$ "~" = or
+           { month #0 i - i substring$
+             month #-1 i - #1 substring$
+             month #-2 i - global.max$ i - #1 - substring$
+             * *
+           }
+           { month }
+         if$
+       }
+      if$
+    }
+    { month }
+  if$
+}
+
 FUNCTION {format.date}
 { year empty$
     { month empty$
        { "" }
        { "there's a month but no year in " cite$ * warning$
 FUNCTION {format.date}
 { year empty$
     { month empty$
        { "" }
        { "there's a month but no year in " cite$ * warning$
-         month
+         format.month
        }
       if$
     }
     { month empty$
        'format.year
        }
       if$
     }
     { month empty$
        'format.year
-       { month do.space format.year * }
+       { format.month do.space format.year * }
       if$
     }
   if$
       if$
     }
   if$