<table>
<tr>
<th>Function</th>
<th>Description</th>
<th>Example</th>
</tr>
<tr>
<td><code>moment().format(formatString)
Formats a date as a string according to the specified format. |
moment().format('MMMM Do YYYY, h:mm:ss a') => September 20th 2024, 3:45:07 pm |
moment().add(number, unit) |
Adds a specified amount of time to a date. |
moment().add(7, 'days') => Moment object 7 days in the future |
moment().subtract(number, unit) |
Subtracts a specified amount of time from a date. |
moment().subtract(1, 'year') => Moment object 1 year ago |
moment().fromNow() |
Displays the time from now in a human-readable format. |
moment('2020-01-01').fromNow() => 3 years ago |
moment().diff(moment, unit) |
Calculates the difference between two dates. |
moment().diff(moment('2000-01-01'), 'years') => 24 |
Ramda is a functional programming library for JavaScript developers, designed for better code composition and function handling.