Jacob Kaplan-Moss

4 items tagged “datetime”

📌 Ned Batchelder: Mocking datetime.today

I always forget how to successfully mock datetime. Ned’s technique is good, and he’s got pointers to a couple other options too. Hopefully now I won’t forget! #

📌 Stephen Colebourne's blog: Time-zone databse down

The consequences of bullshit IP law at work. This is terrifying. #

📌 Python Package Index : magicdate 0.1.3

A plugin for optparse to do fuzzy dates. Lets your CLI scripts take arguments like “--start today --end tomorrow”; very cute. #

📌 parsedatetime project

From the Chandler project, a Python module to parse “natural” datetime constructs (i.e. “tomorrow”, “next monday”, and even “two weeks from last thursday at noon”). The API is shitty and Java-esque, but the functionality is great. #