Python datetimes used with timezones, even UTC, are ridiculously slow and bloated. It's puzzling why this doesn't wrap np.datetime64 instead. Or wrap boost.datetime. There are many good options to claw some performance back so it's really head-scratch inducing that someone would recognize that stdlib datetime is a dog and then wrap it instead of scrapping it.
> It's puzzling why this doesn't wrap np.datetime64 instead. Perhaps to avoid the numpy dependency. I've found numpy a bit heavy and wouldn't want to depend on it simply for the sake of some datetime syntax. May be boost.datetime or even numpy's implementantion on datetime, but that sounds like a lot of maintenance.
Maya – Python Datetimes for Humans
141–150 of 180 posts
Re: Maya – Python Datetimes for Humans
#142This is a joke. The whole "library" is 200 lines, has 9 tests, Kenneth probably wrote it in a couple of hours. It is totally not necessary, because, there are a gazillion datetime libraries and still, this is on the front page? Also: >>> dt = maya.now() >>> dt.datetime() datetime.datetime(2016, 12, 18, 19, 24, 50, 212663, tzinfo= ) >>> dt.datetime('Europe/Budapest') datetime.datetime(2016, 12, 18, 20, 24, 50, 212663,…
Re: Maya – Python Datetimes for Humans
#143This is a joke. The whole "library" is 200 lines, has 9 tests, Kenneth probably wrote it in a couple of hours. It is totally not necessary, because, there are a gazillion datetime libraries and still, this is on the front page? Also: >>> dt = maya.now() >>> dt.datetime() datetime.datetime(2016, 12, 18, 19, 24, 50, 212663, tzinfo= ) >>> dt.datetime('Europe/Budapest') datetime.datetime(2016, 12, 18, 20, 24, 50, 212663,…
Re: Maya – Python Datetimes for Humans
#144This is a joke. The whole "library" is 200 lines, has 9 tests, Kenneth probably wrote it in a couple of hours. It is totally not necessary, because, there are a gazillion datetime libraries and still, this is on the front page? Also: >>> dt = maya.now() >>> dt.datetime() datetime.datetime(2016, 12, 18, 19, 24, 50, 212663, tzinfo= ) >>> dt.datetime('Europe/Budapest') datetime.datetime(2016, 12, 18, 20, 24, 50, 212663,…
Re: Maya – Python Datetimes for Humans
#145This is a joke. The whole "library" is 200 lines, has 9 tests, Kenneth probably wrote it in a couple of hours. It is totally not necessary, because, there are a gazillion datetime libraries and still, this is on the front page? Also: >>> dt = maya.now() >>> dt.datetime() datetime.datetime(2016, 12, 18, 19, 24, 50, 212663, tzinfo= ) >>> dt.datetime('Europe/Budapest') datetime.datetime(2016, 12, 18, 20, 24, 50, 212663,…
Just wanted to remind you that the entire Node community depends on one 11-line module. Lines of code is still a pretty meaningless metric.
Re: Maya – Python Datetimes for Humans
#146Earlier quoted context omitted.
Just wanted to remind you that the entire Node community depends on one 11-line module. Lines of code is still a pretty meaningless metric.
Idk, pointing to issues like deep dependency within the Node community isn't the best argument. It's healthy to be skeptical of dependencies imo, especially in light of issues like the infamous left pad problem.
Re: Maya – Python Datetimes for Humans
#147> Maya never panics, and always carrys a towel.
Nice reference!
Re: Maya – Python Datetimes for Humans
#148Awesome! Timekeeping is hard and I'm glad we now have one more tool do deal with it. One thing that is bothering me is that when you ask for `maya.when('tomorrow')`, or give only a date, you get back a timestamp with millisecond precision, representing 00:00 of that day. I understand this simplifies the implementation, but shouldn't `tomorrow` be a range , from 00:00 to 23:59? Treating imprecise dates as ranges would…
[1]: https://docs.python.org/3/library/datetime.html#date-objects [2]: https://docs.python.org/3/library/datetime.html#time-objects
Re: Maya – Python Datetimes for Humans
#149Awesome! Timekeeping is hard and I'm glad we now have one more tool do deal with it. One thing that is bothering me is that when you ask for `maya.when('tomorrow')`, or give only a date, you get back a timestamp with millisecond precision, representing 00:00 of that day. I understand this simplifies the implementation, but shouldn't `tomorrow` be a range , from 00:00 to 23:59? Treating imprecise dates as ranges would…
Python already contains separate date and time objects for this purpose[1][2]! [1]: https://docs.python.org/3/library/datetime.html#date-objects [2]: https://docs.python.org/3/library/datetime.html#time-objects
Re: Maya – Python Datetimes for Humans
#150Earlier quoted context omitted.
I think there are two separate issues here. One thing is that some libraries bring their own not-really-different-just-different-enough-to-break-things date/time types to the table. That can be worked out over time, not that big of a problem, just inconvenient. The other is that I've grown to think that the abstraction commonly used, seeing date/time as something like (year, month, day, hour, minute, second, subsecon…
Regarding recurrence rules specifically, I worked in the financial services industry and bonds and derivatives obviously recur (usually monthly) for decades. Not only do you need to specify the precise dates of recurrences, but you also need to map time intervals to fractions of a year (e.g. if I owe you $1mm a year, is 'one month' equal to 1/12 of a year, or do I count the actual numer of days in between? What about…