Last active
February 5, 2016 15:55
-
-
Save kaugesaar/d1f3e77f1db777c360a7 to your computer and use it in GitHub Desktop.
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
if(! Date.toAdWordsString) { | |
Date.prototype.toAdWordsString = function () { | |
var y = String(this.getFullYear()); | |
var m = this.getMonth() + 1; | |
var d = this.getDate(); | |
m = (m < 10) ? '0' + m : String(m); | |
d = (d < 10) ? '0' + d : String(d); | |
return y + m + d; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment