[54] Results

Golang : Convert date string to variants of time.Time type examples

golang date convert-timestamp format-date

Here are few examples on how to convert a given date of string type to equivalent time.Time type. Most newbies….... read more


Golang : How to determine if a year is leap year?

golang date leap-year

A leap year is a year with 366 days instead of 365 days. The algorithm to calculate if a year….... read more


Elastic Search : Mapping date format and sort by date

elasticsearch sort date mapping

While working on the job board for Socketloop.com recently, I need to sort the Elastic Search result based….... read more


Golang : Get current, epoch time and display by year, month and day

golang get-current-time now epoch-time unix-time

Problem :

You need to get current and Epoch(Unix) time and display the time by year, month and day.

Solution….... read more


Golang : Calculate time different

golang time-different

Problem :

You are looking to calculate the days between two dates. How to do that in Golang?

Solution :

.... read more


Golang : Convert int(year) to time.Time type

golang integer-time convert

Problem :

You have integer value such as a year and you want to convert the integer to time.Time type.….... read more


Golang : Get current time from the Internet time server(ntp) example

golang time-zone synchronize-time network-time-protocol

There are times when a program needs to have accurate machine time. For example, the make command found in Unix/Linux.….... read more


Golang : Measure execution time for a function

golang measure-function-time execution-time footer

Ok, this is another way to measure execution time of a Golang function. This method uses defer and produce a….... read more


Advertisement