In this section, you are going to learn how to parse time and date strings in Go, how to convert between different time and date formats, and how to print times and dates in the format you desire. Although this task might look insignificant at first, it can be truly critical when you want to synchronize multiple tasks or when your application needs to read the date from one or more text files, or directly from the user.
The time package is the star of working with times and dates in Go; you will see some of its functions in action in this section.
Before learning how to parse a string and convert it into a time or a date, you will see a simple program named usingTime.go that will introduce you to the time package. The program will be presented in three parts. The first part is the following:
package main import ( "fmt" "time" )...