It is incorrectly defined as no arguments in both lib.d.ts as well as the most recent DefinitelyTyped date.format.d.ts
See spec
I believe it should be this:
toLocaleDateString(locales?: string[] | string, options?: Intl.DateTimeFormatOptions): string;
JavaScript example:
var date = new Date(Date.UTC(2015, 8, 12, 9, 41, 0));
console.log(date.toLocaleDateString(['en-US'], { month: "2-digit" }));
// will write "08" to the console
NOTE: I believe toLocaleTimeString has the same problem.
I am willing to submit a pull request -- I'm just not that familiar with writing jake tests.
It is incorrectly defined as no arguments in both
lib.d.tsas well as the most recent DefinitelyTypeddate.format.d.tsSee spec
I believe it should be this:
JavaScript example:
NOTE: I believe toLocaleTimeString has the same problem.
I am willing to submit a pull request -- I'm just not that familiar with writing jake tests.