# TypeScript 6

**Date:** 2026-05-01  
**Tags:** TypeScript, JavaScript, WebDev  
**URL:** https://kelexine.is-a.dev/til/typescript-temporal-api

---

TIL: TypeScript 6.0 now has native types for the ECMAScript Temporal API. This is the death knell for libraries like moment.js. Temporal provides a much better API for time zones, calendars, and duration math. Used it today to fix a nasty UTC-offset bug in the activity timeline.


```typescript
// Native Temporal API
const now = Temporal.Now.zonedDateTimeISO();
const nextWeek = now.add({ days: 7 });
console.log(nextWeek.toLocaleString());
```



**Related:** [https://tc39.es/proposal-temporal/docs/](https://tc39.es/proposal-temporal/docs/)


---

*This content is available at [kelexine.is-a.dev/til/typescript-temporal-api](https://kelexine.is-a.dev/til/typescript-temporal-api)*
