diff scripts/time/datenum.m @ 19865:e9f89866074c

maint: Cleanup some .m files to follow Octave coding conventions. * accumarray.m, validateattributes.m, iscolormap.m, __imread__.m, __imwrite__.m, imwrite_filename.m, strread.m, getappdata.m, appearance/annotation.m, shrinkfaces.m, rundemos.m, runtests.m, datenum.m, datestr.m: Break long lines before && and ||.
author John W. Eaton <jwe@octave.org>
date Thu, 26 Feb 2015 13:13:40 -0500
parents 9fc020886ae9
children 2645f9ef8c88
line wrap: on
line diff
--- a/scripts/time/datenum.m	Thu Feb 26 13:07:04 2015 -0500
+++ b/scripts/time/datenum.m	Thu Feb 26 13:13:40 2015 -0500
@@ -96,8 +96,8 @@
   persistent monthstart = [306; 337; 0; 31; 61; 92; 122; 153; 184; 214; 245; 275];
   persistent monthlength = [31; 28; 31; 30; 31; 30; 31; 31; 30; 31; 30; 31];
 
-  if (nargin == 0 || nargin > 6 ||
-     (nargin > 2 && (ischar (year) || iscellstr (year))))
+  if (nargin == 0 || nargin > 6
+      || (nargin > 2 && (ischar (year) || iscellstr (year))))
     print_usage ();
   endif
 
@@ -130,8 +130,8 @@
   if (floor (month) != month)
     fracmonth = month - floor (month);
     month = floor (month);
-    if ((mod (month-1,12) + 1) == 2 &&
-        (floor (year/4) - floor (year/100) + floor (year/400)) != 0)
+    if ((mod (month-1,12) + 1) == 2
+        && (floor (year/4) - floor (year/100) + floor (year/400)) != 0)
       ## leap year
       day += fracmonth * 29;
     else