DEV Community

Discussion on: Go vs PHP for short JSON-retrieving code

Collapse
 
crimsonmed profile image
Médéric Burlet

PHP has a very nice way to handle dates you can do things like:

new DateTime('first day of this year')
new DateTime('last day of this month')
new DateTime('last day of December this year')
new DateTime('last day of December this year +1 years');

Thread Thread
 
rodiongork profile image
Rodion Gorkovenko

That made my day! They probably spent significant efforts on parsing this :) On the other hand it is easier to use than whimsical functions and constants in go "time" package. Thank you once more!