public static function monthize($days)
    {
        $now = new \DateTime();
        $end = new \DateTime();

        $duration = new \DateInterval("P{$days}D");

        $diff = $end->add($duration)->diff($now);

        // handle years
        if ($diff->y > 0) {
            $diff->m += 12 * $diff->y;
        }

        return $diff->m;
    }
public static function monthize($days)
    {
        $now = new \DateTime();
        $end = new \DateTime();

        $duration = new \DateInterval("P{$days}D");

        $diff = $end->add($duration)->diff($now);

        // handle years
        if ($diff->y > 0) {
            $diff->m += 12 * $diff->y;
        }

        return $diff->m;
    }
public static function monthize ( $ days ) { $ now = new \ DateTime ( ) ; $ end = new \ DateTime ( ) ; $ duration = new \ DateInterval ( "P{$days}D" ) ; $ diff = $ end -> add ( $ duration ) -> diff ( $ now ) ; // handle years if ( $ diff -> y > 0 ) { $ diff -> m += 12 * $ diff -> y ; } return $ diff -> m ; }
Converts a number of days to a number of months

@param int $days

@return int
Converts a number of days to a number of months