Fast and light relative time strings in JS

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024
  • Read more of what you can do with Intl, as well as see the full code mentioned in this short, in my full blog post: www.builder.io...
    #javascript #performance #webdev #js

Комментарии • 11

  • @Steve8708
    @Steve8708  Год назад +2

    Full code examples, and more cool things you can do with `Intl`, in my full blog post: www.builder.io/blog/relative-time

  • @AZombieHippie
    @AZombieHippie Год назад +6

    It's pretty incredible how co-pilot can be used to make this kind of demo so seamless

  • @soniablanche5672
    @soniablanche5672 Год назад +1

    btw moment developers suggest using luxon instead

  • @webdevgaur
    @webdevgaur Год назад

    Hey man! Great video, I really like the short, sweet, but dense knowledge transfer with a bit of entertainment mixed in.
    Can you tell me the name of the plugin you have, which outputs the code in comments?

  • @Dev-Siri
    @Dev-Siri Год назад +1

    I used to use moment for date formatting. (Added 61kb)
    Then I switched to day.js. (Removed 56kb, Bundle Size = 5kb)
    After this video, I dropped both of them. (Removed 4.572kb, Bundle Size = 428b)
    And with Next 13, It doesn't even matter. (Removed 428b, Bundle Size = 0kb)

  • @airixxxx
    @airixxxx Год назад

    I thought you were replacing the library with just Intl... not that then you needed a function with 20 lines of code for a single thing. It's better to use a library (not moment) that can solve every date problem you have on your app rather than have multiple 20 line functions on an utils file.

  • @Light-nn6hn
    @Light-nn6hn Год назад

    Could u tell me What's the name of the extension that gives u the size of the imports ?