Episode #104: Parsing Time

Here's a problem you might have run into at some point: you are consuming data from an external service, maybe a website or a CSV dump. The textual and numeric fields are easy enough to import. But the dates and times give you trouble, because they are in an unusual or ambiguous format.

Parsing dates and times is a perennial headache in consuming data, because there are a seemingly limitless variety of representations.

In this episode, you'll learn about Ruby's facilities for parsing date and time values, both automatically and, when that breaks down, with guidance from the programmer. You'll become familiar with some under-documented standard library APIs. And you'll get to know a tool you can turn to when Ruby's built in date and time parsing abilities simply aren't sufficient.

This page is just for members. Sign in or subscribe to gain access!