puiutucutu / bearly-functional

a repo of functions, some functional, some bearly 🐻
https://puiutucutu.github.io/bearly-functional/
GNU General Public License v3.0
1 stars 0 forks source link

add makeExcelDate #4

Open puiutucutu opened 4 years ago

puiutucutu commented 4 years ago
/**
 * @param {string} date
 * @return {string}
 * @example
 *
 * makeExcelDate("2019-12-01 12:47:18.000"); //=> 01/12/2019 12:47:18 PM
 */
export const makeExcelDate = date => makeDate("dd/MM/yyyy hh:mm:ss a")(date);
puiutucutu commented 4 years ago

fixed

/**
 * @param {string} date
 * @return {string}
 * @example
 *
 * makeExcelDate("2019-12-01 12:47:18.000"); //=> 12/01/2019 12:47:18 PM
 */
export const makeExcelDate = date => makeDate("MM/dd/yyyy hh:mm:ss a")(date);