📜  角度改变日期的外观 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:26.181000             🧑  作者: Mango

代码示例1
// use Angular DatePipe
{{ dateObj | date: 'format desired' }}

{{ dateObj | date:'shortDate'  'M/d/yy' }}    // output is '1/25/21'
{{ dateObj | date:'mediumDate'  'MMM d, y' }} // output is 'Jan 25, 2021'
{{ dateObj | date:'longDate'  'MMMM d, y' }}  // output is 'January 25, 2021'