User`s guide

Language and Programming
5-9
For example, the MATLAB:addtodate:Nargin identifier has changed to
MATLAB:addtodatemx:Nargin. If your code checks for MATLAB:addtodate:Nargin,
you must update it to check for MATLAB:addtodatemx:Nargin instead. For a mapping
of the new identifiers to the original identifiers, see Technical Support solution 1-
ERAFNC.
No strict-match requirements for month formats when converting date
strings
When reading date strings, the date functions datenum, datevec, and datestr now treat
months expressed as full names, three-letter abbreviations, or numbers in date string
inputs interchangeably. In previous releases, the commands fail if a date string input
does not match the format input. Using the datestr function to write date strings is not
affected.
For example, consider the cell array of date strings, where each date string indicates the
month in a different format:
mydates = {'31-October-2012','31-Oct-2012','31-10-2012'};
datevec(mydates,'dd-mm-yyyy')
ans =
2012 10 31 0 0 0
2012 10 31 0 0 0
2012 10 31 0 0 0
Replacing the date string format input, 'dd-mm-yyyy', with 'dd-mmm-yyyy' or 'dd-
mmmm-yyyy' returns the same output. Previously, the command failed, because the first
two date strings include a full month name and a month abbreviation, which are not
strict matches to the mm month format specified.
Compatibility Considerations
The date functions datenum, datevec, and datestr do not error when month formats
are inconsistent across multiple date strings in a cell array of strings. When reading a
cell array of date strings, you no longer can rely on using a format that includes a field
for month name or abbreviation to catch date strings that specify a month number. You
should ensure that all date strings in a cell array have the same format to avoid the
possibility of confusing day and month numbers. For example,