weekday of last day of a month
3 ビュー (過去 30 日間)
古いコメントを表示
Hi!
How do I find the weekday of the last day of any month in any year?
Thanks!
0 件のコメント
採用された回答
Dyuman Joshi
2023 年 7 月 17 日
編集済み: Dyuman Joshi
2023 年 7 月 17 日
%Current Month
y = 2023;
m = 7;
%Get the date of the last day of the month
day = eomday(y,m)
%Get the weekday of the last day of the month
[DayNumber,DayName] = weekday(datetime(y,m,day))
Edit - In case you want the long name of the day, simply use -
[DayNumber,DayName] = weekday(datetime(y,m,day), 'long')
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Environment and Settings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!