changeset 13170:796dc1d75e06 stable

Fix incorrect newline in weekday.m (bug #34347)
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Tue, 20 Sep 2011 14:02:59 -0500
parents 470ef1a5d66e
children 25467719730b 536c6a5ab705
files scripts/time/weekday.m
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/time/weekday.m	Tue Sep 20 13:32:01 2011 -0400
+++ b/scripts/time/weekday.m	Tue Sep 20 14:02:59 2011 -0500
@@ -61,7 +61,7 @@
 
   if (nargout > 1)
     if (strcmpi (format, "long"))
-      names = {"Sunday" "Monday" "Tuesday" "Wednesday" "Thursday"
+      names = {"Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" \
                "Friday" "Saturday"};
     else
       names = {"Sun" "Mon" "Tue" "Wed" "Thu" "Fri" "Sat"};
@@ -96,6 +96,12 @@
 %!assert(weekday('7-Feb-2008'),5)
 ## Test fractional dates
 %!assert(weekday(728647.1),2)
+## Test "long" option
+%!test
+%! [a, b] = weekday ("25-Dec-1994", "long");
+%! assert (a, 1);
+%! assert (b, "Sunday");
+
 # demos
 %!demo
 %! [n, s] = weekday (now ())