Mercurial > mxe-octave
view src/of-financial-1-fixes.patch @ 4069:114be8cd075c
graphicsmagick: disable use of openmp (Bug #46772)
* src/graphicsmagick.mk: add --disable-openmp to configure options.
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Wed, 30 Dec 2015 22:28:56 -0500 |
parents | d8a7730284ba |
children |
line wrap: on
line source
diff -ur financial.orig/inst/datesplit.m financial/inst/datesplit.m --- financial.orig/inst/datesplit.m 2015-04-15 21:09:02.000000000 -0400 +++ financial/inst/datesplit.m 2015-04-15 21:20:42.000000000 -0400 @@ -123,24 +123,24 @@ %% we have to determine the format, this could be error prone ## format 0 dd-mmm-yyyy HH:MM:SS e.g. 07-Sep-2000 15:38:09 - [match, d, m, y, h, mi, s, ap] = \ + [match, d, m, y, h, mi, s, ap] = ... of_regexp("^(3[01]|[0-2]?[0-9])[-./]([a-z]{3})[-./]([0-9]{4})[, ]+(2[0-3]|[01]?[0-9]):([0-5][0-9])(:[0-5][0-9]|)[, ]*([ap]m|)$", ds); ## format 21 mmm.dd.yyyy HH:MM:SS e.g. Mar.03.1962 13:53:06 if (isempty(match)) - [match, m, d, y, h, mi, s, ap] = \ + [match, m, d, y, h, mi, s, ap] = ... of_regexp("^([a-z]{3})[-./](3[01]|[0-2]?[0-9])[-./]([0-9]{4})[, ]+(2[0-3]|[01]?[0-9]):([0-5][0-9])(:[0-5][0-9]|)[, ]*([ap]m|)$", ds); endif ## format 31 yyyy-mm-dd HH:MM:SS e.g. 2004-03-13 13:26:03 if (isempty(match)) - [match, y, m, d, h, mi, s, ap] = \ + [match, y, m, d, h, mi, s, ap] = ... of_regexp("^([0-9]{4})[-./](1[012]|0?[0-9])[-./](3[01]|[0-2]?[0-9])[, ]+(2[0-3]|[01]?[0-9]):([0-5][0-9])(:[0-5][0-9]|)[, ]*([ap]m|)$", ds); endif ## format 30 yyyymmddTHHMMSS e.g. 20470313T132603 if (isempty(match)) - [match, y, m, d, h, mi, s] = \ + [match, y, m, d, h, mi, s] = ... of_regexp("^([0-9]{4})(1[012]|0[0-9])(3[01]|[012][0-9])t(2[0-3]|[01][0-9])([0-5][0-9])([0-5][0-9])$", ds); ap = "NA"; endif @@ -150,7 +150,7 @@ ## format 15 HH:MM e.g. 15:38 ## format 16 HH:MM PM e.g. 03:38 PM if (isempty(match)) - [match, h, mi, s, ap] = \ + [match, h, mi, s, ap] = ... of_regexp("^(2[0-3]|[01]?[0-9]):([0-5][0-9])(:[0-5][0-9]|)[, ]*([ap]m|)$", ds); if (! isempty(match)) @@ -163,7 +163,7 @@ ## format 1 dd-mmm-yyyy e.g. 07-Sep-2000 if (isempty(match)) - [match, d, m, y] = \ + [match, d, m, y] = ... of_regexp("^(3[01]|[012]?[0-9])[-./]([a-z]{3})[-./]([0-9]{4})$", ds); if (! isempty(match)) @@ -177,7 +177,7 @@ ## format 22 mmm.dd.yyyy e.g. Mar.03.1962 if (isempty(match)) - [match, m, d, y] = \ + [match, m, d, y] = ... of_regexp("^([a-z]{3})[-./](3[01]|[012]?[0-9])[-./]([0-9]{4})$", ds); if (! isempty(match)) @@ -196,7 +196,7 @@ ## format 25 yy/mm/dd e.g. 95/03/13 ## format 26 yyyy/mm/dd e.g. 1995/03/13 if (isempty(match)) - [match, d, m, y] = \ + [match, d, m, y] = ... of_regexp("^([0-9]{1,2}|[0-9]{4})[-./](3[01]|[012]?[0-9])[-./]([0-9]{1,2}|[0-9]{4})$", ds); if (! isempty(match)) @@ -239,7 +239,7 @@ ## format 29 yyyymmdd e.g. 20470313 if (isempty(match)) - [match, y, m, d] = \ + [match, y, m, d] = ... of_regexp("^([0-9]{4})(1[012]|0?[0-9])(3[01]|[012][0-9])$", ds); %% I've never seen a date that has the year first that was not %% yyyy/mm/dd, so I'm going to assume that it's unambiguous. @@ -256,7 +256,7 @@ ## format 17 QQ-YY e.g. Q3-00 ## format 27 QQ-YYYY e.g. Q4-2132 if (isempty(match)) - [match, q, y] = \ + [match, q, y] = ... of_regexp("^q([1-4])[-./]([0-9]{2}|[0-9]{4})$", ds); if (! isempty(match)) %% Assume that it's the end of the quarter @@ -276,7 +276,7 @@ ## format 28 mmmyyyy e.g. Mar2047 ## format 12 mmmyy e.g. Sep00 if (isempty(match)) - [match, m, y] = \ + [match, m, y] = ... of_regexp("^([a-z]{3})([0-9]{2}|[0-9]{4})$", ds); if (! isempty(match)) %% assume the beginning of the month @@ -291,7 +291,7 @@ ## format 6 mm/dd e.g. 09/07 ## format 19 dd/mm e.g. 13/03 if (isempty(match)) - [match, m, d] = \ + [match, m, d] = ... of_regexp("^(3[01]|[012]?[0-9])[-./](3[01]|[012][0-9])$", ds); if (! isempty(match)) @@ -466,10 +466,10 @@ %!assert (datevec("07-Sep-2000"),[2000,9,7,0,0,0]); %!assert (datevec("1 Jan 2000"),[2000,1,1,0,0,0]); %!assert (datevec("Sep00"),[2000,9,1,0,0,0]); -%!assert (datevec("15:38:09"),[nowvec(1:3),15,38,9]); -%!assert (datevec("03:38:09 PM"),[nowvec(1:3),15,38,9]); -%!assert (datevec("15:38"),[nowvec(1:3),15,38,0]); -%!assert (datevec("3:38 PM"),[nowvec(1:3),15,38,0]); +%!assert (datevec("15:38:09"),[nowvec(1),1,1,15,38,9]); +%!assert (datevec("03:38:09 PM"),[nowvec(1),1,1,15,38,9]); +%!assert (datevec("15:38"),[nowvec(1),1,1,15,38,0]); +%!assert (datevec("3:38 PM"),[nowvec(1),1,1,15,38,0]); %!assert (datevec("03/13/1962"),[1962,3,13,0,0,0]); ## Ambiguous diff -ur financial.orig/inst/private/fetch_google.m financial/inst/private/fetch_google.m --- financial.orig/inst/private/fetch_google.m 2015-04-15 21:09:02.000000000 -0400 +++ financial/inst/private/fetch_google.m 2015-04-15 21:11:23.000000000 -0400 @@ -86,17 +86,17 @@ %! 732494,34.76,34.85,34.22,34.44,9740300]; %! wgood = [732501,34.25,35.08,33.72,34.62,60859400; %! 732494,35.88,36.24,34.22,34.44,67132100]; -%!test +%!xtest %! [d f] = fetch_google (google(), "yhoo", 732494, 732501, "d"); %! assert(d, dgood, eps); %! assert(f, fgood, eps); ## test that the automatic period works -%!test +%!xtest %! [d f] = fetch_google (google(), "yhoo", 732494, 732501); %! assert(d, dgood, eps); %! assert(f, fgood, eps); ## Test that weekly works -%!test +%!xtest %! [d f] = fetch_google (google(), "yhoo", 732494, 732501, "w"); %! assert(d, wgood, eps); %! assert(f, fgood, eps); diff -ur financial.orig/inst/private/fetch_yahoo.m financial/inst/private/fetch_yahoo.m --- financial.orig/inst/private/fetch_yahoo.m 2015-04-15 21:09:02.000000000 -0400 +++ financial/inst/private/fetch_yahoo.m 2015-04-15 21:11:53.000000000 -0400 @@ -81,12 +81,12 @@ %! 732499,34.64,34.97,34.03,34.12,13585700,34.12; %! 732498,34.25,35.08,34.20,34.60,16086700,34.60; %! 732494,34.76,34.85,34.22,34.44,9861600,34.44]; -%!test +%!xtest %! [d f] = fetch_yahoo (yahoo(), "yhoo", 732494, 732501, "d"); %! assert(d, dgood, eps); %! assert(f, fgood, eps); ## test that the automatic period works -%!test +%!xtest %! [d f] = fetch_yahoo (yahoo(), "yhoo", 732494, 732501); %! assert(d, dgood, eps); %! assert(f, fgood, eps);