javascript - Moment.JS accent mark in month, spanish? -
i'm using moments js convert c# jsonified datetime /date(1501287730903)/ recommended here
$scope.var = moment($scope.var).todate(); my objective turn variable holds /date(1501287730903)/ not js date, string 05 jan 2017
$scope.var = moment($scope.var).format('dd/mm/yyyy'); works fine, wanting actual letters of month. when proceed
$scope.var = moment($scope.var).format('dd/mmm/yyyy'); however, 28-júl-2017 , mmmm renders 29-júlí-2017
i'm not sure looks it's going spanish months..? how can specify english?
what locale have loaded moment? guessing before code loaded spanish locale this:
moment.locale('es-es'); try load english locale before parsing date this:
moment.locale('en');
Comments
Post a Comment