weekday of last day of a month
조회 수: 1 (최근 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!