C

Chris Smith

crsmithdev.com · Personal blog · on HN since 2013

Chris Smith is a Python developer who wrote the Arrow date and time library and posts on email habits and logistic regression.

What HN saysHN mentions it through Arrow docs, with commenters comparing newer date libraries like Pendulum to it and praising its ability to floor or round times.
18HN people shared it
13linked it in comments
6stories submitted
324story points
8 years agolast shared
2013people per year2026

Most-shared posts

  1. 1
    Arrow: Better dates and times for Python
    16 people · 319 points · first shared 2013 · 72 comments on HN
  2. 2
    Building Better Email Habits with Mailbox
    1 people · 3 points · first shared 2013 · discussion on HN
  3. 3
    Logistic Regression
    1 people · 1 points · first shared 2019 · discussion on HN
  4. 4
    Building Better Email Habits with Mailbox
    1 people · 1 points · first shared 2013 · discussion on HN

What HN people wrote when they linked it

niftich · 2016-12-18
The link to its github was posted on HN when it was brand new, and I left a comment [6], which I'm reproducing here -- since most of my points still apply. (...) take my very early comments with a grain of salt -- they refer to the progress as of this commit [1]. I love Requests -- its API design is fantastic, and manages to distill down most of a complex problem domain to a clean, dare-I-say, elegant API. So I can eagerly anticipate this design applied to datetimes. But the progress being shown so far is definitely not it. >>> tomorrow = maya.when('tomorrow') <MayaDT epoch=1481919067.23> Why is "tomorrow" a precise-to-centisecond, infinitesimally small point on a giant cosmic timeline? I'm reasonably sure it's an abstract concept that describes the calendar day that starts after the current calendar day ends. At least, Pendulum normalizes tomorrow() and its ilk to represent midnight on the given day [2], while Delorean's natural language methods [3] like next_day() advance the day while leaving the time-of-day unchanged, but the method name makes this fairly clear. Even Arrow, which is heavily inspired by Moment.js to the point of conflating every single datetime idea into the same class, opts for mutators that are still more clear [4]. > Timezones fit in here somewhere... Yeah, this needs more work. Java 8 / Threeten, and its predecessor Joda-Time took the approach of clearly modeling each and every concept that humans actually use to describe time; even if you…
sdispater · 2016-08-16
Pendulum is a new library for Python to ease datetimes, timedeltas and timezones manipulation. It is heavily inspired by [Carbon](http://carbon.nesbot.com) for PHP. Basically, the Pendulum class is a replacement for the native datetime one with some useful and intuitive methods, the Interval class is intended to be a better time delta class and, finally, the Period class is a datetime-aware timedelta. Timezones are also easier to deal with: Pendulum will automatically normalize your datetime to handle DST transitions for you. import pendulum pendulum.create(2013, 3, 31, 2, 30, 0, 0, 'Europe/Paris’) # 2:30 for the 31th of March 2013 does not exist # so pendulum will return the actual time which is 3:30+02:00 '2013-03-31T03:30:00+02:00’ dt = pendulum.create(2013, 3, 31, 1, 59, 59, 999999, 'Europe/Paris’) '2013-03-31T01:59:59.999999+01:00’ dt = dt.add(microseconds=1) '2013-03-31T03:00:00+02:00’ dt.subtract(microseconds=1) '2013-03-31T01:59:59.999998+01:00’ To those wondering: yes I know [Arrow](http://crsmithdev.com/arrow/) exists but its flaws and strange API (you can throw almost anything at get() and it will do its best to determine what you wanted, for instance) motivated me to start this project. You can check why I think Arrow is flawed here: https://pendulum.eustace.io/faq/#why-not-arrow Link to the official documentation: https://pendulum.eustace.io/docs/ Link to the github project:…
bndr · 2016-12-18
How does it differ from Arrow which was made several years ago? [1] [1] http://crsmithdev.com/arrow/
scrollaway · 2016-12-18
As rich as it is to tell Kenneth to "consider contributing to existing open source libraries", I have to agree: what's so exceptional about this library when Arrow is already a thing? http://crsmithdev.com/arrow/
kdeldycke · 2016-08-23
Also manipulating datetimes for a living (telemetry + billing). The reason I stick with Arrow despite its slowing maintainership? Its ability to round up or down time along a granularity: http://crsmithdev.com/arrow/#arrow.arrow.Arrow.floor
c17r · 2016-04-19
I'll have to check delorean out, I usually use http://crsmithdev.com/arrow/ for python date manipulation. It works a lot like the javascript library moment.
ForHackernews · 2016-02-15
> Date/time handling in particular is a really poorly handled area Just use Arrow http://crsmithdev.com/arrow/ everywhere, all the time(s). Now your date/time problems are solved.
bohinjc · 2015-06-30
Regarding dates, I would have mentioned Arrow - http://crsmithdev.com/arrow/
Negative1 · 2014-11-24
In the same vein check out Arrow for a big improvement over Pythons standard time/date libraries. As a bonus it also generates human readable dates (though I don't think it parses them like this lib): http://crsmithdev.com/arrow/
grosskur · 2014-03-07
"it's incredibly painful now to deal with time in Python" I suggest looking into Arrow: http://crsmithdev.com/arrow/ My experience is that Arrow fixes date/time handling for Python the same way Requests fixes HTTP handling.
mzs · 2014-03-06
Oh man people that have used python for a while have come to expect datetime to just be strange in general. Essentially the default is to be in your TZ from midnight, you need to convert and there are different classes for epoch, and some of the members seemingly willy-nilly are not there or named differently then! And that's just the start, that's why things like arrow exist: http://crsmithdev.com/arrow/ time and datetime in python show their age.
rotten · 2015-12-24
Wow, there are some great new tools to explore. Thanks! Some of the new libraries I'm using this year that I've found really handy include: Odo - http://odo.readthedocs.org/en/latest/ It is ridiculously handy for converting data from one format to another - especially for transforming a table from a database or csv into a DataFrame and back. Arrow - Makes for quick datetime processing. - http://crsmithdev.com/arrow/ Xlsxwriter - http://xlsxwriter.readthedocs.org - I'm building beautiful reports, with charts, using this tool. As someone who moves data around a lot, but has to work with less technical business and analyst folks, this is becoming my goto for handing them some data to play with. Blessings - https://pypi.python.org/pypi/blessings - as I get older staring at simple black and white text on the screen seems to be getting harder. Putting a little color and flare in my command line interfaces cheers me up even if it doesn't do much in the way of actually getting the job done. Lastly, switching from curl to httpie was a huge help in working with API's of all sorts. It solved a problem I didn't even know I had. https://pypi.python.org/pypi/httpie

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close