Why is this good/better compared to date-fns?
Day.js – Fast 2kB alternative to Moment.js with the same modern API
51–60 of 141 posts
Re: Day.js – Fast 2kB alternative to Moment.js with the same modern API
#52Earlier quoted context omitted.
Who is "some kid"?
Intentionally unspecified. This isn't a personal attack but instead a systemic and cultural critique It's been like this for decades. Emotional salience sells software better than hard practicality to just about everyone. Then people rationalize their irrational choices then the timeline slips and the product sucks. You can just sit and watch it play out like someone studying monkeys. It's remarkably predicable.
Re: Day.js – Fast 2kB alternative to Moment.js with the same modern API
#53Earlier quoted context omitted.
This was the reply I was trying to prevent by saying "minimal code example". I'm not interested in long theoretical articles. But I would look at a few lines of code. Here is an example of some code I recently wrote: logEvent { 'date': new Date().toISOString(), 'event': 'image_updated', 'value': image['id'], } This logs that an image with a given id was updated. Why would I trade in my single date line for 423 files…
This is only you having super basic date needs, not Day.js being overkill in general.
Re: Day.js – Fast 2kB alternative to Moment.js with the same modern API
#54There's an error in the documentation. What's the standard procedure to submit a pull request or bug report here? The docs subdirectory just links to the website and I couldn't find them in the gh-pages branch, either.
Re: Day.js – Fast 2kB alternative to Moment.js with the same modern API
#55Earlier quoted context omitted.
This was the reply I was trying to prevent by saying "minimal code example". I'm not interested in long theoretical articles. But I would look at a few lines of code. Here is an example of some code I recently wrote: logEvent { 'date': new Date().toISOString(), 'event': 'image_updated', 'value': image['id'], } This logs that an image with a given id was updated. Why would I trade in my single date line for 423 files…
> I'm not interested in long theoretical articles Those articles are more empirical in nature than theoretical. > This logs that an image with a given id was updated As a thought exercise, imagine that your log trail needed to be created in a distributed system, spanning multiple machine time zones, or that you needed to build a report that is read from browsers in multiple time zones that differ from multiple differ…
I heard it very often. I don't buy it. Any system, no matter how complex, can be composed of small, simple systems.
I never ran against a "complexity wall" when writing software in a lean way and suddenly thought "Damn, those tens of thousands of lines of library code now would be the better approach".
Re: Day.js – Fast 2kB alternative to Moment.js with the same modern API
#56Earlier quoted context omitted.
Examples of essential complexity you have to worry about if you want your code to be correct, and even if you want to test/detect all issues that can/do come up: - https://infiniteundo.com/post/25326999628/falsehoods-program... - https://infiniteundo.com/post/25509354022/more-falsehoods-pr... In my experience engineers will often brush these sorts of things off as “edge cases”, but really all of these complexities ar…
This was the reply I was trying to prevent by saying "minimal code example". I'm not interested in long theoretical articles. But I would look at a few lines of code. Here is an example of some code I recently wrote: logEvent { 'date': new Date().toISOString(), 'event': 'image_updated', 'value': image['id'], } This logs that an image with a given id was updated. Why would I trade in my single date line for 423 files…
Re: Day.js – Fast 2kB alternative to Moment.js with the same modern API
#57Earlier quoted context omitted.
Intentionally unspecified. This isn't a personal attack but instead a systemic and cultural critique It's been like this for decades. Emotional salience sells software better than hard practicality to just about everyone. Then people rationalize their irrational choices then the timeline slips and the product sucks. You can just sit and watch it play out like someone studying monkeys. It's remarkably predicable.
As important as the relatively low file size is for the utility of this library, the API compatibility with Moment is perhaps the magnum opus.
This wasn't anything about the posted software. It was a reply to a comment.
Re: Day.js – Fast 2kB alternative to Moment.js with the same modern API
#58Where are the benchmarks?
Re: Day.js – Fast 2kB alternative to Moment.js with the same modern API
#59- https://github.com/tc39/proposal-temporal
- https://github.com/tc39/proposal-temporal#polyfills
- https://tc39.es/proposal-temporal/
- https://tc39.es/proposal-temporal/docs/index.html
- https://github.com/tc39/proposal-temporal/issues/1450
- https://tc39.es/proposal-temporal/docs/parse-draft.html
As far as I know, issue #1450 is the last remaining blocker for the standardization. I'd assume that this will be resolved in the next months. So Temporal will likely be officially released with ECMAScript 2023, but browser vendors and other implementors will start shipping it before the offical release.
Re: Day.js – Fast 2kB alternative to Moment.js with the same modern API
#60Earlier quoted context omitted.
> I'm not interested in long theoretical articles Those articles are more empirical in nature than theoretical. > This logs that an image with a given id was updated As a thought exercise, imagine that your log trail needed to be created in a distributed system, spanning multiple machine time zones, or that you needed to build a report that is read from browsers in multiple time zones that differ from multiple differ…
You are trying to convince me with the popular "This is not going to work for a much more complex system". I heard it very often. I don't buy it. Any system, no matter how complex, can be composed of small, simple systems. I never ran against a "complexity wall" when writing software in a lean way and suddenly thought "Damn, those tens of thousands of lines of library code now would be the better approach".