Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Clojure
  3. clj-time

clj-time

NOASSERTIONClojurev0.15.2

A Clojure date and time library wrapping Joda Time, now deprecated in favor of Java Time alternatives.

GitHubGitHub
737 stars160 forks0 contributors

What is clj-time?

clj-time is a Clojure library that wraps the Joda Time Java library to provide functional, immutable date and time operations. It solves the problem of cumbersome time handling in Clojure by offering a clean API for creation, arithmetic, formatting, and comparison of dates and times. The library is now deprecated as Joda Time itself is superseded by Java Time in Java 8+.

Target Audience

Clojure developers working on applications that require robust date and time manipulation, especially those using Joda Time in legacy Java environments or prior to Java 8 adoption.

Value Proposition

Developers choose clj-time for its idiomatic Clojure interface to Joda Time's comprehensive features, reducing boilerplate and providing immutable, functional date-time operations. Its seamless integration with SQL databases via JDBC extensions is a key advantage for data-driven applications.

Overview

A date and time library for Clojure, wrapping the Joda Time library.

Use Cases

Best For

  • Legacy Clojure applications using Joda Time before Java 8 migration
  • Parsing and formatting dates in multiple custom formats
  • Generating sequences of dates at regular intervals (e.g., scheduling)
  • Performing complex date arithmetic with time zones
  • Working with SQL databases using DateTime objects directly
  • Checking date conditions like weekends or month ends in business logic

Not Ideal For

  • New projects using Java 8 or later where java.time is built-in and recommended
  • Cross-platform ClojureScript applications needing date-time handling in JavaScript environments
  • Teams prioritizing actively maintained libraries with modern support and updates

Pros & Cons

Pros

Idiomatic Clojure Interface

Provides a functional, immutable API that wraps Joda Time, making date-time operations more expressive and less error-prone in Clojure, as shown in the core namespace with functions like date-time and plus.

Seamless JDBC Integration

Offers protocol extensions in clj-time.jdbc to use DateTime objects directly with SQL databases, reducing boilerplate for database operations without manual coercion.

Rich Formatting and Parsing

Supports built-in ISO8601 and custom formatters for flexible date serialization, with examples in clj-time.format for parsing strings like '20100311' with custom patterns.

Comprehensive Date Arithmetic

Enables complex time manipulations such as adding months or weeks, interval management, and generating periodic sequences, detailed in clj-time.core and clj-time.periodic.

Cons

Deprecated and Outdated

Marked as deprecated in the README, with Joda Time itself superseded by Java Time in Java 8+, making it unsuitable for new development and lacking future updates.

Silent Error Handling

Inherits Joda Time quirks, such as unparse silently returning the current date/time when passed nil, leading to potential bugs without explicit checks, as warned in the README.

No ClojureScript Support

Tightly coupled to Joda Time, a Java library, so it cannot be used in ClojureScript or non-JVM environments, limiting its applicability for modern cross-platform projects.

Frequently Asked Questions

Quick Stats

Stars737
Forks160
Contributors0
Open Issues2
Last commit4 years ago
CreatedSince 2011

Tags

#parsing#formatting#java-interop#functional-programming#date-time#clojure#immutable#time-manipulation#joda-time

Built With

C
Clojure

Included in

Clojure2.8k
Auto-fetched 3 hours ago

Related Projects

clojure.java-timeclojure.java-time

Java 8 Date-Time API for Clojure

Stars489
Forks47
Last commit1 year ago
timewordstimewords

Multilingual library to easily parse date strings to java.util.Date objects.

Stars32
Forks2
Last commit6 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub