[28] Results

Golang : Calculate elapsed years or months since a date

golang elapsed-time date year month

This is additional tutorial to our previous tutorial on how to calculate elasped run time. We will learn….... read more

Golang : Determine if time variables have same calendar day

golang time-equal compare-date

Problem :

You have two or more variables that are of type time.Time and you want to find out if….... read more

Golang : Calculate future date with time.Add() function

golang time-different future-date

Problem :

You need to calculate future dates by number of days. This can be use in calculating expiring dates….... read more

Golang : How to execute code at certain day, hour and minute?

golang hour-minute-second year-month-day time-now-date


You want to execute certain code at a particular day, hour and minute only. Such as Monday, 10:30 AM.….... read more

Golang : Human readable time elapsed format such as 5 days ago

golang date-time-stamp future-past-date ago elapsed human-readable


You need to convert a date time stamp such as this 02 March 1992 10:10:50 into a human readable….... read more

Golang : Get timezone offset from date or timestamp

golang offset time-zone date-to-string

Problem :

You have a date or time stamp and you want get the time zone offset from the date.

.... read more

Golang : How to get year, month and day?

golang year-month-day time-now-date

Problem :

You want to extract the year, month and day from today's date. How to do that?

Solution :

.... read more

Golang : Find age or leap age from date of birth example

golang date-of-birth month-to-integer leap-year-age

Alright, here is a simple tutorial on how to calculate a person's age by a given date of birth string.….... read more