% Generates a vector of dates over the interval [dateStart:dateEnd].
% Inputs dateStart, dateEnd can be strings (of format accepted by datenum() function), or Matlab serial dates.
% Output vector can be of two different types: cell array of strings, or Matlab serial dates.
%
% syntax: v = dateseries(dateStart,dateEnd)
% v = dateseries(dateStart,dateEnd,'parameter','value',...)
%
% optional parameters:
% Interval (string) - Interval between indeces of the output vector: 'daily', 'weekly', 'monthly', or 'quarterly'.
% Defaults to 'daily'.
% OutputType (string) - Data type of the output vector: 'string' or 'serial'
% Defaults to 'string'.
% OutputFormat (string) - Format of the output vector (for a cell array of strings).
% Should allow any format supported by datestr() function.
% Defaults to 'mm/dd/yyyy'.
% Day (string / integer) - Filters output vector to specified days: 'all' or 'weekdays' for 'daily, 'monthly', 'quarterly' intervals.
% Specific day of week 'Mon','Tue',etc for 'weekly' interval.
% Or numeric value for every nth day of 'daily' interval.
% Defaults to 'all'.
% DayInInterval (string / integer) - Filters ouptut vector to specified day
% in interval: 'start' or 'end', for 'monthly' and 'quarterly' intervals
% or numeric value for 'monthly' intervals (e.g. 15th of every month).
% Defaults to 'end'.
%
引用格式
Toby (2024). dateseries(dateStart,dateEnd,varargin) (https://www.mathworks.com/matlabcentral/fileexchange/61921-dateseries-datestart-dateend-varargin), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
平台兼容性
Windows macOS Linux类别
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!