practicalli / practicalli/clojure
Java Time API with Clojure
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 117
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
Projects
- juxt/tick - time as a value (uses cljc.java-time and time-literals projects under the covers)
- https://github.com/henryw374/cljc.java-time - library for Clojure and ClojureScript projects, with kebab-case named vars and predicate functions
- time-literals
- clojure.java-time - a simple wrapper around the Java Time API
Deprecated projects
- clj-time/clj-time
- joda-time (used as the basis for Java TIme API) - deprecated since Java 8 introduced the Java Time API
References
Practicalli pages to update
https://practical.li/clojure/reference/clojure-syntax/more-java-fun.html
TODO: Add Date Time section to Reference > Standard Library section
- use juxt/tick as the defacto library for both Clojure and ClojureScript projects (tick uses cljc.java-time under the hood)
- add any meaningful comparisions to using cljc.java-time or juxt/tick
- examples of using Clojure.java-time and Java Time API
- using Java Time API directly removed the need for a library dependency
- summary of why to choose one of the mentioned projects
clojure.java-time example
Add clojure.java-time to project deps.edn file
{:paths ["src"]
:deps {org.clojure/clojure {:mvn/version "1.10.1"}
clojure.java-time {:mvn/version "0.3.2"}}}
Require java-time namespace.
call local-date-time to get the date and time when the function was called
(ns practicalli.what-time-is-it
(:require [java-time :as time]))
(defn -main []
(println "The time according to Clojure java-time is:"
(time/local-date-time)))
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Practicalli Clojure syntax page at practical.li/clojure/reference/clojure-syntax/more-java-fun.html and the Reference > Standard Library section. Review tick, cljc.java-time, time-literals, and clojure.java-time, then add the Date Time section with the requested examples, comparisons, dependency guidance, and selection summary. Done means the reference explains direct Java Time API use and the relevant library choices.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure, java
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100