Skip to content
Snippets Groups Projects
Commit dad6b80c authored by Dóra Kocsis's avatar Dóra Kocsis
Browse files

Add support for daily frequency in mdbnomics2dseries conversion.

parent 1b897b37
Branches
Tags
1 merge request!38Daily frequency
......@@ -26,6 +26,8 @@ function series_start_date = get_series_start_date(frequency, original_period)
date_ext = regexp(original_period, '\d*', 'Match');
switch frequency
case 'daily'
series_start_date = original_period;
case 'monthly'
series_start_date = [date_ext{1} 'M' regexprep(date_ext{2},'\<0*','')];
case 'quarterly'
......@@ -98,3 +100,18 @@ end
%$
%$ T = all(t);
%@eof:4
%@test:5
%$ try
%$ str = get_series_start_date('daily','1997-01-01');
%$ t(1) = true;
%$ catch
%$ t(1) = false;
%$ end
%$
%$ if t(1)
%$ t(2) = dassert(str, '1997-01-01');
%$ end
%$
%$ T = all(t);
%@eof:5
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment