⏳ 9 years. That's how long it took JavaScript to admit that new Date() was broken. Temporal just reached Stage 4. It's officially in ECMAScript 2026. Already shipping in Firefox and Chrome. TypeScript 6.0 includes the types. V8 14.4 turned it on by default, which means the next Node.js major gets it native with no flag. 🔥 Why this matters JavaScript Date has been a joke since 1995. Month indexes start at 0. Mutation everywhere. No time zone support. DST math that silently lies to you. Every team has written a Date wrapper at 2am. Every project pulls in a 70KB date library. That era is ending. 🧠 What Temporal gives you • Immutable date/time objects. No more accidental mutations. • Built-in time zones. Real zones, not offsets. DST-aware arithmetic that works. • Clear separation of concerns: PlainDate, PlainTime, PlainDateTime, ZonedDateTime, Instant, Duration. Each type means one thing. • Non-Gregorian calendars supported natively. • No more "is this UTC or local?" guessing game. Before: const meeting = moment.tz("2026-05-03 10:00", "Europe/Paris"); const inNY = meeting.clone().tz("America/New_York"); After: const meeting = Temporal.ZonedDateTime.from({ year: 2026, month: 5, day: 3, hour: 10, timeZone: "Europe/Paris" }); const inNY = meeting.withTimeZone("America/New_York"); No clone. No mutation. No surprises. ✅ What you can delete from package.json • moment (deprecated for years, still installed everywhere) • date-fns (for most cases) • luxon • dayjs • that custom Date helper nobody wants to own Keep them if you ship to browsers older than 2025 or Node older than 26. Everywhere else, start migrating. What library are you killing first - moment, date-fns, or that hand-rolled Date util in your repo? 👇 #javascript #typescript #nodejs #ecmascript #temporal #webdev #frontend #backend #tc39 #fullstack
JavaScript Date Replaced by Temporal in ECMAScript 2026
More Relevant Posts
-
#Day21 JavaScript just got a whole lot more interesting. Up until now, everything I wrote lived in the browser. Today I started working with Node.js and the fs module and for the first time, my code started talking to my computer directly. Three things clicked today: => Reading a file: "fs.readFile" opens a file sitting on your computer and prints its contents. That's it. No browser, no UI, just my code and my file system having a conversation. => Writing a file: "fs.writeFile" creates a brand new file and puts text inside it. If the file doesn't exist yet, Node creates it for you. One line of code does what used to feel like a whole process. => Appending to a file: "fs.appendFile" adds new content to an existing file without deleting what's already there. It runs after the file is created because in Node, async operations happen in sequence through callbacks. => process.on('uncaughtException'): Ending today with "process.on", this is a safety net. Instead of your program crashing with no explanation, it catches the error, tells you what went wrong, and shuts down cleanly. JavaScript isn't just a browser language. With Node.js, you can read files, write files, manage your system, and build backends all with the same language you already know. Same language. Bigger world. #NodeJS #JavaScript #M4ACELearningChallenge #BackendDevelopment #LearningToCode #WebDevelopment
To view or add a comment, sign in
-
-
I used to think JavaScript was just for making buttons clickable. 🖱️ Then I learned about Node.js — and everything changed. Here's what blew my mind: In 1995, JavaScript was built in just 10 days. It was sandboxed inside the browser with one job — make web pages interactive. No file access. No network. No servers. Fast forward to 2009 — Ryan Dahl had a wild idea: → Extract Chrome's V8 engine (open source) → Bind it with C++ → Give JavaScript access to the Operating System The result? Node.js. JavaScript could now run on servers. One language. Frontend AND backend. Full stack. I just published my first blog breaking this down from scratch: ✅ Why JS was originally browser-only ✅ How the V8 engine works (high level) ✅ What C++ bindings actually do ✅ Event-driven architecture explained simply ✅ Real-world companies using Node.js If you're starting your backend journey, this one's for you 👇 🔗 https://lnkd.in/dZTRdWGa Hitesh Choudhary Piyush Garg Chai Aur Code #NodeJS #JavaScript #Backend #WebDevelopment #Hashnode
To view or add a comment, sign in
-
-
JavaScript Just Fixed Its Worst Feature JavaScript's Date object was broken from day one. Brendan Eich copied it from Java in 1995. Java deprecated it in 2014. JavaScript has been used for 31 years. Until now. The Temporal API just hit Stage 4 — officially part of ES2026. Already shipping in Chrome 144, Firefox 139, and Edge 144. Here's why every JS developer should care: ❌ Date: months are 0-indexed (0 = January) ✅ Temporal: months are 1-12, like humans expect ❌ Date: objects are mutable — pass one around, and anything can change it ✅ Temporal: immutable by default — no silent mutations ❌ Date: adding 1 month to Jan 31 gives you March 3 ✅ Temporal: adding 1 month to Jan 31 gives you Feb 28 (correct) ❌ Date: no timezone support — "3 pm in Tokyo" is impossible without libraries ✅ Temporal: first-class timezones with ZonedDateTime ❌ Date: need Moment.js, date-fns, or Day.js for basic operations ✅ Temporal: 200+ built-in methods for dates, times, durations, and comparisons The best part? Temporal doesn't just give you one type. It gives you the RIGHT type for each use case: → PlainDate — birthdays, holidays (no time attached) → PlainTime — alarms, store hours (no date attached) → ZonedDateTime — scheduling across time zones → Instant — timestamps, logging, database records → Duration — "How long did this take?" 9 years of development. 4,500+ conformance tests. Backed by Bloomberg, Igalia, Google, and Mozilla. This is the biggest quality-of-life upgrade JavaScript has received in years. The only catch? Safari still hasn't shipped it. So polyfills are needed for ~36% of browsers — for now. Have you tried the Temporal API yet — or still using Date? #FullStackWithArup #JavaScript #ES2026 #TemporalAPI #WebDevelopment #BuildInPublic #Frontend #TypeScript
To view or add a comment, sign in
-
-
I spent months writing async Node.js code without really understanding it. Then a production bug taught me the event loop the hard way. Here's what you need to know: Node.js is single-threaded — but it handles thousands of concurrent requests without freezing. How? The event loop. It has 4 key parts: 1. Call Stack — Your sync code runs here, line by line. One thing at a time. 2. libuv Thread Pool — Async tasks (file I/O, HTTP requests) get offloaded here. Your code keeps running. 3. Microtask Queue — Promise callbacks live here. They run BEFORE anything else queued. 4. Macrotask Queue — setTimeout and setInterval callbacks wait here. This explains a classic JS gotcha: console.log('1') setTimeout(() => console.log('2'), 0) Promise.resolve().then(() => console.log('3')) console.log('4') Output: 1 → 4 → 3 → 2 The Promise fires before the setTimeout — even with a 0ms delay. Once you understand this, a whole category of async bugs just... disappears. What part of async JavaScript tripped you up most? Drop it below 👇 #NodeJS #JavaScript #WebDevelopment #SoftwareEngineering #FullStack
To view or add a comment, sign in
-
-
⚠️ JavaScript Arrays: Mutating vs Non-Mutating Quick thing that caused me way too many bugs before I really paid attention to it 👇 Some array methods actually change the original array… and some don’t. 🧠 Mutating → they modify the same array ✨ Non-mutating → they give you a new one instead Sounds simple, but here’s where it gets tricky… I used to assume my original data was “safe”, then suddenly something else in the app behaved weirdly — turns out I had already changed that array without realizing it. The tricky part is that mutations aren’t always obvious at first. You might only notice later when something behaves differently than expected. This becomes even more important when working with state (like in React), where consistency really matters. Not a big concept… but it makes a big difference. #JavaScript #WebDev #FrontendDevelopment #ReactJS #CodingTips #ProgrammingTips
To view or add a comment, sign in
-
-
Most developers don’t fully understand the global object in JavaScript… And honestly, I was one of them. In the browser, we use window. In Node.js, we use global. In web workers, we use self. Different environments… different ways to access the same thing. It felt messy. Then I came across something interesting: globalThis A single, standard way to access the global object — no matter where your JavaScript runs. console.log(globalThis); That’s it. No more guessing: "Am I in browser?" "Is this Node?" "Should I use window or global?" But here’s the real question… Why was this needed? Because JavaScript was never designed to run everywhere. But today, it does — browsers, servers, workers, everywhere. So globalThis is like a bridge that unifies all environments. Simple example: globalThis.appName = "Learning JS"; console.log(globalThis.appName); Works everywhere. No conditions. No hacks. My takeaway: Good JavaScript is not about memorizing features. It’s about understanding why they exist. And globalThis is a perfect example of that. Have you ever faced issues with window vs global? Would love to hear your experience. #JavaScript #NamasteJavaScript #NamasteDev #Frontend #WebDevelopment #Learning
To view or add a comment, sign in
-
The JavaScript module pattern — properly explained. Not just "use export and import." But: → Why global scope is a battlefield → How closures create privacy → What the browser does before running a single line of your module → Why modules never block your page → And where even ES Modules fall short Deep-dive guide is live. Link below. #JavaScript #WebDevelopment #Frontend
To view or add a comment, sign in
-
Stop writing React like it's 2021. 🛑 The ecosystem has evolved. If you want a cleaner, more performant codebase, it is time to upgrade your patterns: 🔄 Data Fetching: useEffect ❌ TanStack Query ✅ 🧠 Global State: Context API ❌ Zustand ✅ 📝 Forms: useState / useRef spam ❌ React Hook Form / React 19 Actions ✅ ⚡ Performance: useMemo / useCallback ❌ React Compiler ✅ 🎨 Styling: CSS-in-JS / bloated SCSS ❌ Tailwind CSS ✅ 🛡️ Validation: Manual checks & any ❌ Zod + TypeScript ✅ Less boilerplate. Fewer unnecessary re-renders. Better developer experience. What is a tool or pattern you finally stopped using this year? 👇 #ReactJS #WebDevelopment #Frontend #TypeScript #TailwindCSS
To view or add a comment, sign in
-
The event loop is one of the most explained and most misunderstood topics in JavaScript. Most resources treat Browser and Node.js as similar — they're not. Wrote my humble contribution covering the actual differences: correct libuv phase order, microtask timing, the setTimeout vs setImmediate race condition, and browser equivalents of Node.js APIs. https://lnkd.in/ddkw39d2 #JavaScript #NodeJS #EventLoop #WebDevelopment
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development