Created
August 20, 2016 00:30
-
-
Save icambron/d7a241bd0f853273aa28a29bbfa32a33 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<pre><code class="language-js">moment().subtract(<span class="number">10</span>, <span class="string">'days'</span>).calendar();<span class="comment"> // ٩/‏٨/‏٢٠١٦</span> | |
moment().subtract(<span class="number">6</span>, <span class="string">'days'</span>).calendar(); <span class="comment"> // السبت عند الساعة ٢٠:٣٠</span> | |
moment().subtract(<span class="number">3</span>, <span class="string">'days'</span>).calendar(); <span class="comment"> // الثلاثاء عند الساعة ٢٠:٣٠</span> | |
moment().subtract(<span class="number">1</span>, <span class="string">'days'</span>).calendar(); <span class="comment"> // أمس عند الساعة ٢٠:٣٠</span> | |
moment().calendar(); <span class="comment"> // اليوم عند الساعة ٢٠:٣٠</span> | |
moment().add(<span class="number">1</span>, <span class="string">'days'</span>).calendar(); <span class="comment"> // غدًا عند الساعة ٢٠:٣٠</span> | |
moment().add(<span class="number">3</span>, <span class="string">'days'</span>).calendar(); <span class="comment"> // الإثنين عند الساعة ٢٠:٣٠</span> | |
moment().add(<span class="number">10</span>, <span class="string">'days'</span>).calendar(); <span class="comment"> // ٢٩/‏٨/‏٢٠١٦</span></code></pre> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment