Skip to content

pass arguments Date toLocaleDateString #27

@vxf

Description

@vxf

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);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions