JavaScript Date.toLocaleDateString() returns a string that contains Left-To-Right Mark characters which may not be used to create a new Date

Duplicate Issue #101503 • See Issue #101495

Details

Created
Apr 27, 2014
Privacy
This issue is public.
Duplicates
See progress on Bug #101495
Found in build #
0.0011
Reports
Reported by 0 people

Sign in to watch or report this issue.

Steps to reproduce

URL =

URL:

Repro Steps:

  1. Open attached repro in IE or Chrome
  2. Open F12 and click on console
  3. Refresh the page

To reproduce the bug, use Internet Explorer 11’s JavaScript console and enter the following:

var dt = new Date('Mon Dec 09 2013 00:00:00 GMT-0500');
var s = dt.toLocaleDateString();
console.log('Locale Date String: ' + s);
var dtNew = new Date(s);
dtNew;

Expected Results:

IE 11’s JavaScript should create a valid Date object when passing the output of .toLocaleDateString() into the Date object’s constructor.

Actual Results:

IE displays Invalid date

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “IPBS P.”

      Changed Assigned To from “IPBS P.” to “Bruce M.”

      Changed Assigned To to “Brian T.”

      Changed Status to “Confirmed”

      Changed Assigned To from “Brian T.” to “IPBS P.”

      Changed Status from “Confirmed” to “Duplicate”

      Changed Steps to Reproduce

    You need to sign in to your Microsoft account to add a comment.

    Sign in