Datetime is such a fundamental thing in programming. For a restaurant site I made I had to make a modal that showed if they were open or not and it seemed simple at first but it was actually quite a puzzle. Things like this make it easier, so thnx! :)
@CodinginPublic
Жыл бұрын
Agreed! I am really excited for the temporal API! It’ll make date/time math much easier, too! Hoping to explore it soon!
@neontuts5637
Жыл бұрын
Thanks for sharing Chris 🙏. Now no need of using packages to format dates in JavaScript. And it is easy to implement.
@CodinginPublic
Жыл бұрын
Glad it was a help! Yep! And especially once the temporal API is really up and running, most won't need date libraries any more!
@neontuts5637
Жыл бұрын
@@CodinginPublic Yes, thank you.
@DTUSEM
Жыл бұрын
Interesting topic. Suggestion - You can make a series on different APIs weekly.
@CodinginPublic
Жыл бұрын
Since I just make one major video a week, I’ll probably mix it up more, but there are so many browser APIs that remove the need for libraries people still use. I’d like to keep going on these types of videos :)
@DTUSEM
Жыл бұрын
@@CodinginPublic okay
@r-i-ch
Жыл бұрын
Neat. Knew about this, but not the alternate calendars.
@CodinginPublic
Жыл бұрын
Me neither until I started looking into it!
@DTUSEM
Жыл бұрын
I think we can use narrow weekday in calendar
@franx1c0
9 ай бұрын
Thanks for the video, I always struggle with JS dates :D do you have any video about adding/removing days? or for that you recommend a library?
@CodinginPublic
9 ай бұрын
Date fns is good! There’s a new temporal api in js for dealing with dates that can also do that. Glad you enjoyed the video!
@hardwired89
Жыл бұрын
@djmtype
Жыл бұрын
Have you tried this in Astro with markdown files using SSG? When it builds, it's a day off due to the whole timezone issue. When setting the timezone to UTC, it works, but I'm unsure when building this on Netlify, where the timezone may be different, this will return the right date.
@CodinginPublic
Жыл бұрын
You can set the time zone and netlify will respect it. So if you take your date object and do the following… date.toLocaleString("en-US", {timeZone: "America/New_York"}));
@MuhammadAdnan2.0
Жыл бұрын
Great bro 👌
@CodinginPublic
Жыл бұрын
Glad you enjoyed it!
@MuhammadAdnan2.0
Жыл бұрын
@@CodinginPublic React too...
@CodinginPublic
Жыл бұрын
🙌
@thedeveloper9896
Жыл бұрын
First again, pog!
@CodinginPublic
Жыл бұрын
🙌
@huytranuc7870
Жыл бұрын
Cool. What is your theme and font used in this vid?
@CodinginPublic
Жыл бұрын
Glad you enjoyed it. Cascadia Code and Monokai Pro (vid here: kzitem.info/news/bejne/lqt7uoiOsYiba6g)
Пікірлер: 24