xdate
xdate copied to clipboard
pass arguments Date toLocaleDateString
XDate in fact uses the underlying toLocaleDateString method of Date, unfortunately it's currently incapable of passing the arguments to the underlying toLocaleDateString which would be very useful: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString Would be good to see this improvement.
As a quick hack this will get the said functionality for now: XDate.prototype.toLocaleDateString = function(locale, options) { return this[0].toLocaleDateString(locale, options); }