Simon Willison’s Weblog

Subscribe

6 items tagged “datetime”

2021

Temporal: getting started with JavaScript’s new date time API. Axel Rauschmayer explores the new proposed API for handling dates, times and timezones in JavaScript., which is under development by Ecma TC39 at the moment (and made available as a Polyfill which you are recommended not to run in production since the API is still being figured out). This is a notoriously difficult problem so it’s always interesting to see the latest thinking on how to best address it. # 7th July 2021, 10:29 pm

2009

Tips on using python’s datetime module. Wow. I’ve run in to problems with datetime and timezones before, but I had no idea how intrinsic those problems were to the design of the library. # 6th July 2009, 2:20 pm

Making the HTML5 time element safe for historians. PPK presents a detailed history of dates and calendars and points out that the HTML5 time element is ill prepared to faithfully represent the kind of dates historians are interested in. # 6th April 2009, 2:01 pm

2007

Datejs—A JavaScript Date Library. Building a date API around chaining—Date.today().next().thursday()—is a neat concept. I’d like to see that adapted for Python’s datetime library. # 3rd December 2007, 9:01 pm

calendar.timegm() (via) An “unrelated but handy function” that converts a time.gmtime() in to a corresponding Unix timestamp. I’ve been hand-rolling this one for years; never thought to look in calendar. # 3rd September 2007, 1:54 am

Django vs feedparser on dates. Some useful tips in the comments. I find Python’s timezone stuff endlessly frustrating: I know it can do what I want, but it always takes me a ridiculously long time to figure out the necessary incantations. # 2nd September 2007, 10:17 am