New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest adding method " format" to Date.prototype. #898

Closed
wendux opened this Issue Apr 18, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@wendux

wendux commented Apr 18, 2017

Since we often need a custom time display format, I suggest adding method " format" to Date.prototype , so we can use the time format symbol like other programming language, such as java.
For example, we can write code like this:
(new Date()).format("yyyy-MM-dd hh:mm:ss")

@annevk

This comment has been minimized.

Show comment
Hide comment
@annevk

annevk Apr 18, 2017

Contributor

I recommend reading https://github.com/tc39/ecma262/blob/master/CONTRIBUTING.md. This is not the right place for proposals.

Contributor

annevk commented Apr 18, 2017

I recommend reading https://github.com/tc39/ecma262/blob/master/CONTRIBUTING.md. This is not the right place for proposals.

@domenic

This comment has been minimized.

Show comment
Hide comment

@domenic domenic closed this Apr 18, 2017

@littledan

This comment has been minimized.

Show comment
Hide comment
@littledan

littledan Apr 18, 2017

Member

FWIW In the context of the DateTimeFormat, we've discussed the pattern here. cc @zbraniecki @caridy

Member

littledan commented Apr 18, 2017

FWIW In the context of the DateTimeFormat, we've discussed the pattern here. cc @zbraniecki @caridy

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