[28] Results

Golang : Loop each day of the current month example

golang loop-date number-of-days-in-month


You need to get the current month, find out the number of days in the month programmatically and loop….... read more

Golang : Print instead of building pyramids

golang pyramids for-loop

Building a pyramid using ancient Egyptians way can be too difficult for more software developers. Just for fun, let's print….... read more

Golang : Read until certain character to break for loop

golang break-for-loop

Encounter a situation where I need to tell the editor that is time to save the input and exit while….... read more

Golang : How to iterate a slice without using for loop?

golang for-loop recursive iterate

A very simple example on how to iterate a slice of integers without using a for loop and use recursive….... read more

Golang : Compare files modify date example

golang last-modify-date compare-files-date time-date


You're writing a game that will create multiple save files and you want to compare the save game files….... read more

Golang : Change date format to yyyy-mm-dd

golang date-format long-form-date short-form-date

Problem :

Your Golang program is producing date in long form that look like this :

2015-08-11 17:21:52.776537624 +0800 MYT

.... read more

PHP : Convert string to timestamp or datestamp before storing to database(MariaDB/MySQL)

php date timestamp strtotime

Problem :

Need to convert a date string in PHP before storing the date into database(MariaDB/MySQL). The field in table….... read more

Golang : Date and Time formatting

golang date time timestamp

Our civilizations won't progress till this stage without proper understanding, parsing and organising our lives base on date and time.….... read more