Created
December 18, 2020 02:48
-
-
Save raflyfahrezi/77bd1ff1359bca56b4bb59e0429ac2a1 to your computer and use it in GitHub Desktop.
Javascript Date Full Month
This file contains hidden or 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
const dateFormat = paramsDate => { | |
const month = new Array() | |
let temp = paramsDate | |
month[0] = 'January' | |
month[1] = 'February' | |
month[2] = 'March' | |
month[3] = 'April' | |
month[4] = 'May' | |
month[5] = 'June' | |
month[6] = 'July' | |
month[7] = 'August' | |
month[8] = 'September' | |
month[9] = 'October' | |
month[10] = 'November' | |
month[11] = 'December' | |
temp = temp.substr(0, 10) | |
temp = temp.split('-') | |
return `${Number(temp[2])} ${month[Number(temp[1]) - 1]} ${temp[0]}` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment