Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
nicbou
on Jan 4, 2022
|
parent
|
context
|
favorite
| on:
Do not use 'week year': YYYY
Is there something similar for Python or JavaScript?
Cthulhu_
on Jan 4, 2022
|
next
[–]
eslint is the de facto standard for Javascript, there may be rules or plugins to check for date formatting rules.
nicoburns
on Jan 4, 2022
|
parent
|
next
[–]
There is no date formatting in JavaScript's standard library. External libraries tend to just fix this kind of thing with a breaking change.
JimDabell
on Jan 4, 2022
|
root
|
parent
|
next
[–]
There is – here’s the spec:
https://tc39.es/ecma402/#datetimeformat-objects
nicoburns
on Jan 4, 2022
|
root
|
parent
|
next
[–]
Ah yes. I can't use that yet due to lack of browser support so I forgot it existed.
JimDabell
on Jan 4, 2022
|
root
|
parent
|
next
[–]
It’s pretty well supported now – even Internet Explorer 11 has partial support. But if you need it, there’s a polyfill here:
https://formatjs.io/docs/polyfills/intl-datetimeformat/
LinAGKar
on Jan 4, 2022
|
prev
[–]
There is Pylint for Python
Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: