Learn how to create datetime parsing utilities using clj-time.
- [Teacher] In this video,…we'll start implementing the backend namespace,…and we'll begin by implementing…the datetime utilities that we'll need.…I'm in the backend.clj file, and I'll begin…by defining our namespace as lakepend.backend.…Now, in a require expression,…I'll pull in clojure.string as str.…Now I'll in the clj-time library,…and I'll use its core namespace,…aliased as just t, as in time.…I'll also pull in clj-time's format namespace…as tf, for time format, and I'll also use…clj-time's coerce namespace, with just two functions.…
So I'll use refer and I'll pull in to-long and from-long.…These functions will convert a Unix epoch time…to a datetime object and back.…Now I'll pull in our lakepend.request namespace,…and I'll use refer to pull in…just the function fetch-seq-for-year.…Now we can begin by implementing our datetime operations.…First, I'll define a generic function…called datetime-str arrow ms.…
This will take a datetime string…and convert it into a Unix epoch time.…First, it will take a format-string…
Skill Level Intermediate
1. Problem 1: Exploring Lake Pend Oreille
2. Problem 2: Image Analysis
3. Problem 3: Eight Queens
4. Problem 4: Accessing Peripherals
5. Problem 5: Recursion and Directories
6. Problem 6: Building the Web
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.