monthnum2name
% J.McDowell - 10/07/20
% Simple function to convert month number to month name (eg [7] to 'July').
% Multiple numeric inputs are accepted (eg [5,8] outputs {'May','August'}).
%% Inputs
% MonthNumber: Numeric array of integers within the range 1 to 12.
% Multiple numeric inputs accepted in the form [m1,m2,mn...].
% MonthFormat: Character array that must equal either 'First','Short' or
% 'Long'. Input is not case sensitive and abbreviations are accepted.
% 'First' will output the first letter of the month (eg 'S' for September).
% 'Short' will output the first 3 letters of the month (eg 'Jun' for June).
% 'Long' will output the full month name (eg 'January' for the 1st month).
%% Outputs
% MonthName - character or cell array (if multiple numeric inputs given) of
% month names in the user specified Format.
Cite As
John McDowell (2026). monthnum2name (https://in.mathworks.com/matlabcentral/fileexchange/77981-monthnum2name), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
