반응형
- 코드 작성
DateTime today = DateTime.Today;
int daysUntilMonday = ((int)DayOfWeek.Monday - (int)today.DayOfWeek + 7) % 7;
DateTime nextMonday = today.AddDays(daysUntilMonday);
if (nextMonday == today)
{
nextMonday = nextMonday.AddDays(7);
}
Debug.Log("다음주 월요일 : " + nextMonday.ToString("yyyy-MM-dd"));
반응형