This Unity project shows how to implement a simple calendar.
The calendar can be easily implemented by using the following property and method from the DateTime struct.
- DateTime.DayOfWeek property
- DateTime.DaysInMonth method
The property is to determine the day of week. If the day of a month is set to 1 for a DateTime instance then the property will return the day of week for the 1st day of the month. (Please note that Sunday is the first day of the week from the property.)
The method is to determine how many days in the month.
The logic of the calendar is implemented in the Initialize method of BodyManager.cs So please refer to the source code.
