Skip to content

Date.toLocalString() return incorrect string #8654

Description

@StCremer
  • Version: 6.6.0
  • Platform: linnux SentOs7
  • 'uname-a' output: Linux localhost.localdomain 3.10.0-327.28.3.el7.x86_64 deps: update openssl to 1.0.1j #1 SMP Thu Aug 18 19:05:49 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

I'm tying to output date in local format with Russian locale

    Date.toLocaleDateString('ru',{ month: 'short',
            weekday: 'long',
            day: 'numeric'})

I get this in my code.
Even if i do in REPL

> let d=new Date()
undefined
> console.log(d.toLocaleDateString('ru',{month: 'short',weekday:'long', day:'numeric'}))
M09 19, Mon
undefined
> console.log(d.toLocaleDateString('en',{month: 'short',weekday:'long', day:'numeric'}))
Monday, Sep 19
undefined

As you can see english locale works perfect but any other language returns incorrect string.

Browsers for the same code return correct string
понедельник, 19 сент.

First i met this problem in NodeJs 6.4.0 but after update the problem doesn't go

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    i18n-apiIssues and PRs related to Node.js internationalization support.invalidIssues and PRs that are invalid.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions