Created
June 29, 2021 11:31
-
-
Save mprokopov/2f4cc0cc61ac5e9edd55582c09a6eca9 to your computer and use it in GitHub Desktop.
clojure time span at beginning of the month and at the end of the month
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def now (java.time.LocalDateTime/now)) | |
(-> now | |
(.with (java.time.temporal.TemporalAdjusters/firstDayOfMonth)) | |
(.with (java.time.LocalTime/MIN))) | |
(-> now | |
(.with (java.time.temporal.TemporalAdjusters/lastDayOfMonth)) | |
(.with (java.time.LocalTime/MAX))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment