lundi 29 juin 2015

moment: using same parsing format for output format


with libary moment there is option to bring a array of formating options and momentjs use the best match for parsing the input.

for exmaple var date = moment("29-06-1995", ["MM-DD-YYYY", "DD-MM", "DD-MM-YYYY"]);

but what if I want the take the same format that using in parsing for output formating . var dateText = date.format('selected parse') How I know witch format moment choose to use?


Aucun commentaire:

Enregistrer un commentaire