Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dseries
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dynare
dseries
Commits
5858f51e
Verified
Commit
5858f51e
authored
4 years ago
by
Stéphane Adjemian
Browse files
Options
Downloads
Patches
Plain Diff
Fixed bug introduced in
7bb6a68f
.
parent
54114116
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/utilities/convert/dseries2M.m
+6
-6
6 additions, 6 deletions
src/utilities/convert/dseries2M.m
src/utilities/convert/dseries2Q.m
+5
-5
5 additions, 5 deletions
src/utilities/convert/dseries2Q.m
with
11 additions
and
11 deletions
src/utilities/convert/dseries2M.m
+
6
−
6
View file @
5858f51e
...
...
@@ -74,12 +74,12 @@ function ts = dseries2M(ds, method)
end
function
eld
=
expectedlastday
(
m
)
if
ismember
(
m
.
time
(
2
),
[
4
,
6
,
9
,
11
])
if
ismember
(
subperiod
(
m
),
[
4
,
6
,
9
,
11
])
eld
=
30
;
elseif
ismember
(
m
.
time
(
2
),
[
1
,
3
,
5
,
7
,
8
,
10
,
12
])
elseif
ismember
(
subperiod
(
m
),
[
1
,
3
,
5
,
7
,
8
,
10
,
12
])
eld
=
31
;
else
% February
if
isleapyear
(
m
.
time
(
1
))
if
isleapyear
(
year
(
m
))
eld
=
29
;
else
eld
=
28
;
...
...
@@ -88,12 +88,12 @@ function eld = expectedlastday(m)
end
function
iad
=
isalldays
(
m
,
id
)
if
ismember
(
m
.
time
(
2
),
[
4
,
6
,
9
,
11
])
if
ismember
(
subperiod
(
m
),
[
4
,
6
,
9
,
11
])
iad
=
length
(
id
)
==
30
;
elseif
ismember
(
m
.
time
(
2
),
[
1
,
3
,
5
,
7
,
8
,
10
,
12
])
elseif
ismember
(
subperiod
(
m
),
[
1
,
3
,
5
,
7
,
8
,
10
,
12
])
iad
=
length
(
id
)
==
31
;
else
% February
if
isleapyear
(
m
.
time
(
1
))
if
isleapyear
(
year
(
m
))
iad
=
length
(
id
)
==
29
;
else
iad
=
length
(
id
)
==
28
;
...
...
This diff is collapsed.
Click to expand it.
src/utilities/convert/dseries2Q.m
+
5
−
5
View file @
5858f51e
...
...
@@ -91,7 +91,7 @@ function ts = dseries2Q(ds, method)
end
function
eld
=
expectedlastday
(
q
)
if
ismember
(
q
.
time
(
2
),
[
1
,
4
])
if
ismember
(
subperiod
(
q
),
[
1
,
4
])
eld
=
31
;
% last day of March or December
else
eld
=
30
;
% last day of June or September
...
...
@@ -99,7 +99,7 @@ function eld = expectedlastday(q)
end
function
elm
=
expectedlastmonth
(
q
)
switch
q
.
time
(
2
)
switch
subperiod
(
q
)
case
1
elm
=
3
;
case
2
...
...
@@ -113,12 +113,12 @@ function elm = expectedlastmonth(q)
end
function
iad
=
isalldays
(
m
,
id
)
if
ismember
(
m
.
time
(
2
),
[
3
,
4
])
if
ismember
(
subperiod
(
m
),
[
3
,
4
])
iad
=
length
(
id
)
==
92
;
elseif
m
.
time
(
2
)
==
2
elseif
subperiod
(
m
)
==
2
iad
=
length
(
id
)
==
91
;
else
% contains February
if
isleapyear
(
m
.
time
(
1
))
if
isleapyear
(
year
(
m
))
iad
=
length
(
id
)
==
91
;
else
iad
=
length
(
id
)
==
90
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment