My least favorite thing about working with dates in JavaScript is the way months are indexed. You might assume '2019-07' would be understood as being July. In reality, it isn't. It's June. (new Intl.DateTimeFormat( 'en', { month: 'short' } )).format(Date.parse('2019-07'))
Replying to @jonathansampson
Mathias Bynens Retweeted Mathias Bynens
The latest versions of Puppeteer and Chrome DevTools (in Canary) support timezone emulation. Might come in handy when testing timezone-sensitive snippets like these
https://twitter.com/mathias/status/1187649853523931137 …
Mathias Bynens added,
Mathias BynensVerified account @mathias
The #ChromeDevSummit web app lets you view the schedule in your own timezone: https://developer.chrome.com/devsummit/schedule/ … Super handy!
With Puppeteer v2, you can now write automated tests for this functionality. This script takes a screenshot of the schedule as viewed from Buenos Aires. pic.twitter.com/4M05EgGsr3
Show this thread
0 replies
1 retweet
16 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.