vendredi 22 janvier 2016

Convert Date to Natural Language Using MomentJS

Currently, I am developing a website where input is required to take multiple dates that could be sequential, or random dates.

After the dates have been selected using a datepicker, I want to display them in natural language.

For example:

  • January 4th - 8th
  • Tomorrow
  • This weekend

Is there a way to do this in MomentJS? I can not seem to figure it out. If not, are there any other libraries available that I can use?

I found SugarJS, which does the opposite of what I need.

Thanks




Aucun commentaire:

Enregistrer un commentaire