Golang Project Structure

Tutorials, tips and tricks for writing and structuring code in Go (with some additional content for other programming languages)

time

Tag

How to Determine if a Year Is a Leap Year

Not all years are of the same length — some are shorter or longer than others — so if you’re writing code that deals with dates and durations, it may be important to take account of this. What Is a Leap Year? In the Gregorian calendar, a leap year has 366 days, whereas other years […]

Handling Times, Dates and Durations of Time

Unlike some other programming languages, Go offers really good native support for working with durations, dates and times. We will look at how they are represented in Go, before exploring some of the various methods and functions that can be used to modify, parse or format them.