Crates.io | usec |
lib.rs | usec |
version | 0.3.4 |
source | src |
created_at | 2022-08-10 02:34:22.73181 |
updated_at | 2023-03-27 03:48:40.749023 |
description | A Rust module with the ability of calculating US stock exchange calendar with full and half-day holidays |
homepage | |
repository | https://github.com/midnightcodr/usec |
max_upload_size | |
id | 642371 |
size | 38,624 |
This is a Rust module with the ability of calculating US stock exchange calendar with full and half-day holidays. I've borrowed code heavily from https://github.com/xemwebe/cal-calc, special thanks to https://github.com/xemwebe
I've developped simular applications in the past using:
I was not satisfied with neither approach due to the requirement of having to insert new db records or updating the dotenv file year after year, that's why I came to this rule-based solution.
Use directly as a rust module in other rust applications that depends on the US Stock exchange calendar information
Build a micro-service based on this module, using popular rust web frameworks such as actix-web to provide service to any programs that supports http requests, example usage of the service is to run certain business scripts on a trading date
cargo run --example show_year 2022
# just for the fun, supply JSON formatted env variable to add 3/3/2022 into the rules set
ADDITIONAL_RULES='[{"SingularDay": "2022-03-03"}]' cargo run --example show_year 2022