O'Reilly logo

Go Standard Library Cookbook by Radomir Sohlich

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How it works...

The Time type provides methods to extract time units. The preceding example shows the extraction of a weekday, month, and the day of a month. Similarly, the hour, seconds, and other units can be extracted.

Naturally, the units that are not provided by the API directly need to be derived from the existing one.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required