Fresh for 2025: Complete Deno Guide & JavaScript's Date Revolution
Hey 👋🏼,
Happy new year everyone! I hope you had a great start of the year.
Over the holidays I finished my Everything I know about Deno guide. Writing the last chapter about deploying Deno apps. You can find it with all the rest here. (I even added a back to top button since this guide became reaaaally long).
I'm super happy with finishing the first version of my guide and now looking forward to optimize it and make it even clearer.
Another topic that I initially thought about adding is the new Temporal API in JavaScript. This new API makes working with dates and times in JavaScript a loot easier. But since this is a more general topic I decided to keep this out of the guide but writing a blog post instead about it: The End of Date Libraries? Exploring JavaScript's Built-in Temporal API
In the post I compare the current Date
object and its methods with the new Temporal API showing how easier and more predictable it is. As an example see the following excerpt of the post:
Add 5 days to future date
This example demonstrates Temporal's superior date manipulation capabilities. The Date API requires multiple steps and mutates the original date object using the error-prone setDate()
method. Temporal's add()
method is immutable, more readable and accepts an intuitive object parameter that indicates the intent to add 5 days.
const date = new Date();
const temporal = Temporal.Now.plainDateTimeISO();
const dateAdd = new Date(date.setDate(date.getDate() + 5));
const temporalAdd = temporal.add({ days: 5 });
console.log("original date", date); // 2025-01-10T12:52:25.797Z - (original date gets mutated);
console.log("date add:", dateAdd); // 2025-01-10T10:52:33.781Z
console.log("temporal add:", temporalAdd); // 2025-01-10T11:52:33.794710016
Find the new blog post The End of Date Libraries? Exploring JavaScript's Built-in Temporal API on my blog.
Thank you for reading,
Niklas