date-fns

moment vs date-fns locale date formats

一个人想着一个人 提交于 2019-12-07 00:29:03
问题 I'm evaluating DateFns and Moment in the context of our app, and found what appears to be an important omission in DateFns. In Moment, locale support allows you to format locale-correct representations of a date or time. For instance, the date formats "LL" and "L" will produce the following for the English locale: November 27, 2017 11/27/2017 And the following for the Spanish locale: 27 de noviembre de 2017 27/11/2017 Note in particular that in the second example, the month comes before the