Created
October 18, 2020 01:38
-
-
Save asharimh97/13309fd18114b1620e8a2caa5d290600 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import moment from "moment"; | |
/** | |
* This function uses moment as its date formatter because | |
* we reuse `moment.js` which being used as one of ANTD's dependency. | |
* | |
* But if you want to change both ANTD date formatter and this function | |
* please take a look here first: | |
* https://ant.design/docs/react/replace-moment | |
*/ | |
const generateLog = (message, date) => { | |
return `LOG: [${moment(date).format("dddd, D MMM YYYY")}]: ${message}`; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment