Martin Angelov

Joined on Aug 20th 2009
admin
Tutorialzine founder. Interested in development and design. Busy working on the next big thing.
  • I can suggest the Carbon PHP library for this. It has a handy method - diffForHumans that can output something similar. Here is how it's used:

    <?php
    
    use Carbon\Carbon;
    
    $firstDate = Carbon::parse('2017-02-19');
    $secondDate = Carbon::parse('2015-11-14');
    
    echo $firstDate->diffForHumans($secondDate);
    

    A thing to keep in mind is that by default this rounds up to the larger unit, so the library would only output "1 Year", instead of 1 Year, X months.

  • Thanks for the reply! We will be announcing the redesign officially soon, complete with our experience migrating to Laravel. These last few days were dedicated to fixing issues and making the new site more usable, but I think we are almost ready for prime time :)

  • To get things started let me introduce myself.

    I am Martin and am based in Bulgaria. I am a web developer and I created Tutorialzine in 2009, during my first year in university (it has been 8 years, can you imagine? Time flies so fast..). Since then I've done a few other projects, but Tutorialzine has always been the place to share what I've learned. A couple of years back, Danny started helping out, and today he is the main editor of the site.

    A big thanks goes to all of you who've been reading Tutorialzine over the years! We have big plans for this site, and with your help, we can make awesome things.