8

I search an awesome Python library date like Moment.js. Do you know some?

I want especially a library that can do conversions like this: 09/25/2012 00:00 - 09/25/2012 13:00 to 09/25/2012 00:00 - 13:00.

tsil
  • 2,069
  • 7
  • 29
  • 43

4 Answers4

4

Some Python libraries inspired by Moment.js:

Arrow and Delorean seem a bit more mature, although I have not really used any of them extensively.

etov
  • 2,972
  • 2
  • 22
  • 36
NeilenMarais
  • 2,949
  • 1
  • 25
  • 23
1

datetime is as good as it gets. See it action here

Fredrik Pihl
  • 44,604
  • 7
  • 83
  • 130
1

datetime and it comes with the standard library. And here is Doug Hellman's introduction to the "module of the week".

root
  • 76,608
  • 25
  • 108
  • 120
1

You can try these 3rd party packages:

  • dateutil
  • mxDatetime : its parser is pretty good. Check whether the license works for you, though.
Pierre GM
  • 19,809
  • 3
  • 56
  • 67
  • Can we parse dates range with them? For example, can they transform 09/25/2012 00:00 - 09/25/2012 13:00 to 09/25/2012 00:00 - 13:00? – tsil Sep 19 '12 at 10:53
  • you can use moment .step -1 Install moment package. step 2 momemt.now() and play any date manipulation https://github.com/zachwill/moment – jayesh Mar 11 '19 at 04:12