-
Notifications
You must be signed in to change notification settings - Fork 115
Closed
Labels
c: datetimeComponent: dates, times, timezonesComponent: dates, times, timezoness: in progressStatus: the issue has an active proposalStatus: the issue has an active proposal
Description
I need to format a Timestamp in a specific locale (not utc, not browser locale). But I must have the millisecond part of the date, too. My first attempt was second:'numeric' with the DateTimeFormat API:
new Intl.DateTimeFormat(
'de-DE', // german as an example, user selectable
{
year: 'numeric', month: 'numeric', day: 'numeric',
hour: 'numeric', minute: 'numeric',
second: 'numeric',
hour12: false
}
)
.format(new Date()); // Date as an exampleBut the result is something like 26.11.2018, 09:31:04 and not 26.11.2018, 09:31:04,243.
Asked first at stackoverflow.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
c: datetimeComponent: dates, times, timezonesComponent: dates, times, timezoness: in progressStatus: the issue has an active proposalStatus: the issue has an active proposal