Fork me on GitHub
#beginners
<
2023-01-08
>
mathpunk19:01:50

What’s the current recommendation for handling dates in Clojure/Java? I’m looking to handle concepts like “First and 15th of the month” but I don’t care about time zones (thank g*d)

JohnJ19:01:55

java.time

2
☝️ 2
lispyclouds19:01:04

are you looking for something like a cron? something triggering on the 1st and the 15th etc?

mathpunk19:01:48

nothing with triggering really, i’m just trying to get a handle on my personal finances and want to be able to label expenses as weekly, biweekly, etc

mathpunk19:01:58

that mentions Java 8 rather prominently and

$ java -version                                                                                11:38:32
openjdk version "11.0.8" 2020-07-14

mathpunk19:01:01

still relevant?

lispyclouds19:01:49

so its intention is that it uses the java.time package introduced in java 8, not that it only runs on java 8.

mathpunk19:01:02

got it! thanks fellas

lispyclouds19:01:46

so min version is java 8, same as clojure 1.10+ 🙂 in general, you would mostly see min java versions in clojure libs, not max

2
pppaul00:01:52

juxt/tick is ok for this type of thing too

pppaul00:01:12

unless you are talking about parsing a date in the example format

mathpunk01:01:00

I'll check that out too for comparison, thanks!