A simple function for converting days to years, months and days.
Function
function getFormatedStringFromDays(numberOfDays) {
var years = Math.floor(numberOfDays / 365);
var months = Math.floor(numberOfDays % 365 / 30);
var days = Math.floor(numberOfDays % 365 % 30);
return [years, months, days].join(':');
}