Moment.apex

Moment.apex is a library that parses, manipulates and displays dates and times in Apex.

Why Moment.apex?

Moment.apex provides a nice and neat way to handle date and time in Apex. It offers the missing functionality to parse date/time from strings. Also it has a rich set of API to manipulate and display date/time.

Date/Time Parsing

Moment.apex can parse Date/Time from strings, which is not currently supported in Apex.

Date/Time Manipulation

Moment.apex manipulates Date/Time with a fluent API.

Date/Time Display

Moment.apex provides API to display humanized duration as well as Date/Time formatting.

Straightforward API

Moment.apex has a well-designed API to be easily used in Apex code.

Date/Time Parsing

Moment.apex can parse Date/Time from strings in a wide range of formats.

Fluent API

Date/Time Manipulation

Moment.apex provides a rich set of APIs to manipuate Date/Time.

Collection Support

Date/Time Display

Moment.apex can display a humanized string of Date/Time duration.

Function Composition