From the course: Coding Exercises: Rust
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Has a deadline been reached? - Rust Tutorial
From the course: Coding Exercises: Rust
Has a deadline been reached?
(dramatic music) - [Narrator] I'm always forgetting my friend's birthdays which is why this challenge is especially important for me. Challenge seven, check deadline. In this challenge, we will be asked to create a function that can tell whether or not an event's date has already occurred. Well, we tested in two ways. Firstly, we haven't worked with time before and secondly we'll be using third party code. Requirements, we must design an important event data structure, that has at least fields to store the name and the date. Let's say we're talking about a friend's birthday, we want to know who it is and when the birthday is. We must implement the deadline trait for important event. Feel free to use your local time zone. Here are two further details. Firstly, you don't need to implement your own time handling routines. Time handling is provided by the chrono crate. The sample code will automatically download and compile…
Contents
-
-
-
Calculate the median7m 26s
-
Find unique items4m 3s
-
(Locked)
Print any text type4m 17s
-
(Locked)
Case-insensitive sort2m 54s
-
(Locked)
Convert text to Morse Code6m 33s
-
(Locked)
Value of a hand of cards6m 25s
-
(Locked)
Has a deadline been reached?3m 30s
-
(Locked)
Convert between Celsius and Fahrenheit4m 21s
-
(Locked)
Sum a list of numbers with missing values4m 21s
-
(Locked)
Calculate the number of weeks between two dates5m 20s
-
(Locked)
Validate an ISBN number17m
-
(Locked)
Check if a file exists7m 36s
-
(Locked)
Interpret an RGB hex color16m 25s
-
(Locked)
Run-length encoding15m 11s
-
(Locked)
Handle inconsistent dates11m 51s
-
(Locked)
Travel planner21m 12s
-
(Locked)
Final challenge: Vigenère cipher13m 44s
-