Moment.jsで日付を正しくフォーマットする際に問題があります。私は "LLL D、YYYY"の形式で書式関数を使用していますので、 "2016年9月15日"のようなものを返してください。Moment.jsの日付をフォーマットする方法
代わりに、「2016年9月15日12:00 AM 15、2016」のような奇妙な形式の日付が返されます。
私のコードは以下のデバッグ情報です。
moment.locale(picker.options.language);
console.log('picker.options.language:');
console.log(picker.options.language);
formatted = moment(picker.date).format(picker.format);
console.log('picker.date:');
console.log(picker.date);
console.log('picker.format:');
console.log(picker.format);
console.log('formatted:');
console.log(formatted);
そして、上記のコードからのコンソール出力:私たちは、「LLL」は形式「月の名前、月、年、時間の日」を表していることがわかりますhttp://momentjs.com/docs/#/displaying/format/から
が事実を除き、 「LL」の昏睡はないI aggree – user3
ありがとうございました。そのフォーマットは、PHPのIntlDateFormatter :: defaultDateFormats [self :: MEDIUM]からはるか上流に来ていました。 – amacrobert