Skip to content
This repository has been archived by the owner on Nov 15, 2018. It is now read-only.

Commit

Permalink
fix(filters): formatDate 方法支持字符串格式的时间了
Browse files Browse the repository at this point in the history
  • Loading branch information
mutoe committed Jul 13, 2018
1 parent 9ad229d commit d7aa648
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export function plusMessageAnalyze(message, defaultMessage) {
* @return {String}
*/
export function formatDate(date, fmt = "yyyy/MM/dd hh:mm") {
date = new Date(date);
const o = {
"M+": date.getMonth() + 1,
"d+": date.getDate(),
Expand Down

0 comments on commit d7aa648

Please sign in to comment.