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
No related branches found
No related tags found
No related merge requests found
Pipeline #3843 passed
...@@ -26,6 +26,8 @@ function series_start_date = get_series_start_date(frequency, original_period) ...@@ -26,6 +26,8 @@ function series_start_date = get_series_start_date(frequency, original_period)
date_ext = regexp(original_period, '\d*', 'Match'); date_ext = regexp(original_period, '\d*', 'Match');
switch frequency switch frequency
case 'daily'
series_start_date = original_period;
case 'monthly' case 'monthly'
series_start_date = [date_ext{1} 'M' regexprep(date_ext{2},'\<0*','')]; series_start_date = [date_ext{1} 'M' regexprep(date_ext{2},'\<0*','')];
case 'quarterly' case 'quarterly'
...@@ -98,3 +100,18 @@ end ...@@ -98,3 +100,18 @@ end
%$ %$
%$ T = all(t); %$ T = all(t);
%@eof:4 %@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