1

I'm currently using instagram's API to gather JSON data about photos and I'm using an underscore template to display the data. I'm having difficulties printing the date (which is provided in Unix time) in a simple month/day/year format.

<div class="mask">  
    <h2> <!-- Formatted date --> </h2>  
    <p>
         <% if (item.get('caption')) { %>
         <%= item.get('caption').text %>
         <% } %>
    </p>  
    <p><%= item.get('likes').count %> likes, <%= item.get('comments').count%> comments</p>  
</div>  
4

1 に答える 1