Date of last occurrence of weekday in month
returns
the date number for the last occurrence of LastDate
= lweekdate(Weekday
,Year
,Month
)Weekday
in
the given year and month.
Any input can contain multiple values, but if so, all other inputs must contain the same
number of values or a single value that applies to all. For example, if
Year
is a 1
-by-n
vector of integers, then Month
must be a
1
-by-n
vector of integers or a single
integer. LastDate
is then a
1
-by-n
vector of date numbers.
returns
the date of last occurrence of weekday in month using the optional
arguments for LastDate
= lweekdate(___,NextDay
,outputType
)NextDay
and outputType
.
The type of the output for LastDate
depends
on the input outputType
. If this variable is 'datenum'
, LastDate
is
a serial date number. If outputType
is 'datetime'
,
then LastDate
is a datetime array. By default, outputType
is
set to 'datenum'
.
Use the function datestr
to
convert serial date numbers to formatted date character vectors.