moment - Display different format based on condition
<p>I'm using <a href="http://momentjs.com/" rel="nofollow">momentjs</a> and need to display date in the following way:</p>

<p><strong><em>If recent (within last 7 days):</em></strong></p>

<pre><code>Tuesday 9:40am
</code></pre>

<p><strong><em>If not recent (7 or more days ago):</em></strong></p>

<pre><code>Jun 15
</code></pre>

<p>It looks like a common use case to me, but I wasn't able to find docs for it. How can I accomplish this? Preferably without additional JavaScript logic.</p>