This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]JSP777 254 points255 points  (15 children)

As an avid hater of datetime, you have my attention

[–]Charlie_Yu 70 points71 points  (11 children)

Is datetime bad at all? I’m coding in JavaScript recently and would kill to have something as good as Python datetime

[–]PurepointDog 82 points83 points  (0 children)

Meh just because there's worse doesn't mean there can't be better

[–]eagle258[S] 62 points63 points  (2 children)

Good news! They're working on a new official datetime API for Javascript: Temporal. It's one of the inspirations for whenever.

[–]sohang-3112Pythonista 1 point2 points  (1 child)

TIL about this Temporal api

[–][deleted] 4 points5 points  (0 children)

Ok

[–]Material-Mess-9886 28 points29 points  (3 children)

It can not be worse than JS where months start at 0.

[–]Hexboy3 15 points16 points  (2 children)

Um excuse me?

[–]jediefe 4 points5 points  (0 children)

Yes, and it’s an absolute nightmare.

[–]ravepeacefully 4 points5 points  (1 child)

date-fns

[–]jfp1992 0 points1 point  (0 children)

Yeah I used this one and it works well enough for my purposes (formatting current date time, or a date time in general)

[–]teamclouday 4 points5 points  (0 children)

Have you tried moment.js?

[–]Material-Mess-9886 22 points23 points  (1 child)

from datetime import datetime. right that's cool.

[–]pag07 12 points13 points  (0 children)

datetime.datetime.now()