Logo

0x3d.Site

is designed for aggregating information.
Welcome
check repository here

Holi

A library for calendar operations that are aware of weekends and holidays

build Clojars Project cljdoc badge

Examples

(ns my-app
  (:require [luciolucio.holi :as holi]
            [tick.core :as t]))

;      July 2019
; Su Mo Tu We Th Fr Sa
;     1  2  3  4  5  6
;  7  8  9 10 11 12 13
; 14 15 16 17 18 19 20
; 21 22 23 24 25 26 27
; 28 29 30 31

(holi/add (t/date "2019-07-12") 3 :business-days) ; 2020-07-17 (skips weekends)
(holi/add (t/date "2019-07-03") 1 :business-days "US") ; 2019-07-05 (skips 4th of July as a US holiday)

(holi/weekend? (t/date "2019-07-06")) ; -> true
(holi/holiday? (t/date "2019-07-04") "US") ; -> true

Use of juxt/tick is not required (but highly recommended).

Features

  • Standard calendar operations (e.g. add 5 days) that are aware of weekends and holidays to skip those when requested
  • Boolean fns that check individual dates (weekend?, holiday?, business-day? and non-business-day?)
  • List holidays for a certain year, or a specific date
  • Non-standard weekends (supports sat/sun and fri/sat)
  • Clojure and ClojureScript
  • Customize holidays if needed

Disclaimer

Holidays in holi have been put together to the best of the author's knowledge, and are not guaranteed to be neither correct, complete nor historically accurate. You are encouraged to double-check the calendar showcase, the .hol files and perhaps the source to see if the calendar you want to use fits your use case. If you think there's a mistake in a calendar, see I found a problem below.

Install

Import the latest version from Clojars into your project dependencies.

ClojureScript is supported, but holi has only been tested when built with shadow-cljs and run on a browser. It should still work otherwise, but if you have issues with other setups feel free to hit me up on Slack: @Lucio Assis

Docs

Full holi documentation

I found a problem

Contribute a fix, or a new calendar to the project - see CONTRIBUTING.md. You can also just let me know on Slack: @Lucio Assis and I'll try my best to fix it timely.

I want custom holidays

Learn how to build yourself a custom library, with your own holiday calendars.

Clojure
Clojure
Clojure is a modern, functional programming language that runs on the JVM. It emphasizes immutability and concurrency, making it suitable for scalable applications. Its simplicity and powerful abstractions attract developers in data science and backend development.
Biff | Clojure web framework
Biff | Clojure web framework
Kamalavelan / column · GitLab
Kamalavelan / column · GitLab
Clojure Tutorials
Clojure Tutorials
reborg
reborg
Misophistful
Misophistful
ClojureVids
ClojureVids
GitHub - venantius/photon: Experiments in realtime web framework design. Like Meteor, but for Clojure(Script)
GitHub - venantius/photon: Experiments in realtime web framework design. Like Meteor, but for Clojure(Script)
GitHub - fhd/clostache: {{ mustache }} for Clojure
GitHub - fhd/clostache: {{ mustache }} for Clojure
GitHub - dakrone/cheshire: Clojure JSON and JSON SMILE (binary json format) encoding/decoding
GitHub - dakrone/cheshire: Clojure JSON and JSON SMILE (binary json format) encoding/decoding
GitHub - mrdimosthenis/clj-synapses: A neural networks library for Clojure
GitHub - mrdimosthenis/clj-synapses: A neural networks library for Clojure
GitHub - plumatic/schema: Clojure(Script) library for declarative data description and validation
GitHub - plumatic/schema: Clojure(Script) library for declarative data description and validation
GitHub - http-kit/http-kit: Simple, high-performance event-driven HTTP client+server for Clojure
GitHub - http-kit/http-kit: Simple, high-performance event-driven HTTP client+server for Clojure
GitHub - pedestal/pedestal: The Pedestal Server-side Libraries
GitHub - pedestal/pedestal: The Pedestal Server-side Libraries
GitHub - ztellman/proteus: local. mutable. variables.
GitHub - ztellman/proteus: local. mutable. variables.
GitHub - fulcrologic/fulcro: A library for development of single-page full-stack web applications in clj/cljs
GitHub - fulcrologic/fulcro: A library for development of single-page full-stack web applications in clj/cljs
GitHub - tpope/vim-fireplace: fireplace.vim: Clojure REPL support
GitHub - tpope/vim-fireplace: fireplace.vim: Clojure REPL support
Home
Home
GitHub - clojure-cookbook/clojure-cookbook: This is the home of O'Reilly's Clojure Cookbook - http://clojure-cookbook.com
GitHub - clojure-cookbook/clojure-cookbook: This is the home of O'Reilly's Clojure Cookbook - http://clojure-cookbook.com
GitHub - ertugrulcetin/re-frame-flow: Graph based visualization tool for re-frame event chains
GitHub - ertugrulcetin/re-frame-flow: Graph based visualization tool for re-frame event chains
Build software better, together
Build software better, together
Daniel Amber
Daniel Amber
Build software better, together
Build software better, together
GitHub - technomancy/leiningen: Moved to Codeberg; this is a convenience mirror
GitHub - technomancy/leiningen: Moved to Codeberg; this is a convenience mirror
Build software better, together
Build software better, together
Build software better, together
Build software better, together
GitHub - darkleaf/di: DI is a dependency injection framework that allows you to define dependencies as cheaply as defining function arguments.
GitHub - darkleaf/di: DI is a dependency injection framework that allows you to define dependencies as cheaply as defining function arguments.
Build software better, together
Build software better, together
GitHub - junegunn/rainbow_parentheses.vim: :rainbow: Simpler Rainbow Parentheses
GitHub - junegunn/rainbow_parentheses.vim: :rainbow: Simpler Rainbow Parentheses
GitHub - clojure/core.match: An optimized pattern matching library for Clojure
GitHub - clojure/core.match: An optimized pattern matching library for Clojure
GitHub - yogthos/clojure-error-message-catalog: a catalog of common Clojure errors and their meaning
GitHub - yogthos/clojure-error-message-catalog: a catalog of common Clojure errors and their meaning
Clojure
More on Clojure

  1. Programming Tips & Tricks
  2. Error Solutions
  3. Shortcuts
  4. Collections

Tools

available to use.

Made with ❤️

to provide resources in various ares.