Get started with dates, times, and time zones
In this module, you learn how to handle date and time effectively in C# applications that focus on scheduling meetings and logging events across different time zones.
Learning objectives
Use
DateOnly,TimeOnly, andDateTimeclasses to represent dates and times.Perform time zone conversions and interval calculations using
DateTimeOffset,TimeZoneInfo, andTimeSpan.Retrieve and manipulate day of the week information using
DayOfWeek.Handle culture-specific data using
CultureInfo.Perform calendar-related operations using
Calendarand define rules for determining the first week of the year usingCalendarWeekRule.
Prerequisites
Visual Studio Code installed with the C# Dev Kit.
Basic knowledge of the Visual Studio Code IDE.
Basic understanding of the C# programming language.
Familiar with classes, abstract classes, interfaces and inheritance.