Skip to content

Commit 1222a55

Browse files
authored
changed files by pdets auto publish service, publishid[6987ec69-f012-4439-9dd6-2741307c5c10] and do [publish].
1 parent 18bc71d commit 1222a55

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

learn-pr/wwl-azure/get-started-with-dates-times-time-zones/2-examine-csharp-date-time.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,18 @@ metadata:
1010
ms.topic: unit
1111
durationInMinutes: 4
1212
content: |
13-
[!include[](includes/2-examine-csharp-date-time.md)]
13+
[!include[](includes/2-examine-csharp-date-time.md)]
14+
quiz:
15+
title: "Check your knowledge"
16+
questions:
17+
- content: "Which class in C# would be most suitable for calculating the length of events or breaks?"
18+
choices:
19+
- content: "The `DateTime` class."
20+
isCorrect: false
21+
explanation: "Incorrect. While the `DateTime` class can represent specific points in time, it isn't primarily used for representing durations or intervals."
22+
- content: "The `TimeZoneInfo` class."
23+
isCorrect: false
24+
explanation: "Incorrect. The `TimeZoneInfo` class is used for converting times between different time zones, not for representing durations or intervals."
25+
- content: "The `TimeSpan` class."
26+
isCorrect: true
27+
explanation: "Correct. The `TimeSpan` class represents durations or intervals, making it useful for calculating the length of events or breaks."

learn-pr/wwl-azure/get-started-with-dates-times-time-zones/includes/2-examine-csharp-date-time.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2+
13
Imagine you're a programmer working on a part of a project that involves scheduling meetings and logging events across different time zones. To tackle your task, you need to understand how to handle date and time in C#. So you learn about the various classes and methods that allow you to represent, manipulate, and display date and time values effectively.
24

35
## DateOnly, TimeOnly, DateTime
@@ -64,11 +66,4 @@ Console.WriteLine($"Today is: {today}");
6466

6567
The example demonstrates how to retrieve and display the current day of the week using the `DayOfWeek` enumeration. It accesses the `DayOfWeek` property from the current date and time, and outputs the result in a readable format.
6668

67-
By understanding `DateTimeOffset`, `TimeZoneInfo`, and `TimeSpan` classes and their basic methods, you begin to build a foundation for handling date and time in your applications. These concepts help ensure accurate scheduling and logging across different time zones.
68-
69-
## Multiple Choice
70-
71-
Which class in C# would be most suitable for calculating the length of events or breaks?
72-
( ) The `DateTime` class. {{Incorrect. While the `DateTime` class can represent specific points in time, it isn't primarily used for representing durations or intervals.}}
73-
( ) The `TimeZoneInfo` class. {{Incorrect. The `TimeZoneInfo` class is used for converting times between different time zones, not for representing durations or intervals.}}
74-
(x) The `TimeSpan` class. {{Correct. The `TimeSpan` class represents durations or intervals, making it useful for calculating the length of events or breaks.}}
69+
By understanding `DateTimeOffset`, `TimeZoneInfo`, and `TimeSpan` classes and their basic methods, you begin to build a foundation for handling date and time in your applications. These concepts help ensure accurate scheduling and logging across different time zones.

learn-pr/wwl-azure/get-started-with-dates-times-time-zones/index.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ abstract: |
2121
2222
- Handle culture-specific data using `CultureInfo`.
2323
24-
- Perform calendar-related operations using `Calendar` and define rules for determining the first week of the year using `CalendarWeekRule`.
24+
- Perform calenda-related operations using `Calendar` and define rules for determining the first week of the year using `CalendarWeekRule`.
2525
prerequisites: |
2626
- Visual Studio Code installed with the C# Dev Kit.
2727

0 commit comments

Comments
 (0)