-
-
Save mpalmr/6bf09576331393e455fb1a21268fab86 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
var date = new Date() | |
var j = date.getDate() | |
var suf = ['th', 'st', 'nd', 'rd'] | |
var v = j | |
var S = (suf[(v-20) % 10] || suf[v] || suf[0]) | |
var months = ['January','February','March','April','May','June','July','August','September','October','November','December'] | |
var F = months[date.getMonth()] | |
var Y = date.getFullYear() | |
var formatted_date = (F + ' ' + j+S + ', ' + Y) |
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
date('F jS, Y'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment