1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
// <-- Non-regression test for bug 1859 -->
//
// <-- Bugzilla URL -->
// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1859
//
// <-- Short Description -->
// I sent the following commands
//
// Year = [2002, 2002];
// Month = [2, 3];
// Day = [28, 1];
// datenum(Year, Month, Day)
//
// The SCILAB output is:
//
// 731275. 731278.
//
// But this seems me incorrect, as 2002-03-01 is just one day following 2002-02-28.
//
// Now, if you give the commands
//
// datenum(2002,2,28)
// datenum(2002,3,1)
//
// you respectively obtain the two outputs
//
// ...
// Copyright INRIA
// Scilab Project - Pierre MARECHAL
// Copyright INRIA 2006
// Date : 27 fevrier 2006
Year = [2002, 2002];
Month = [ 2, 3];
Day = [ 28, 1];
test = datenum(Year, Month, Day);
ref = [731275 ; 731276];
if ~or(test <> ref) then
affich_result(%T,1859);
else
affich_result(%F,1859);
end
|