Crates.io | holidays_jp |
lib.rs | holidays_jp |
version | 0.1.2 |
source | src |
created_at | 2023-02-18 01:33:59.253959 |
updated_at | 2023-02-18 14:08:29.879356 |
description | holidays_jp determines Japanese national holiday. The definition of holidays is based on csv file provided by the Cabinet Office. |
homepage | |
repository | https://github.com/nabetama/holidays_jp |
max_upload_size | |
id | 787936 |
size | 98,519 |
holidays_jp determines Japanese holiday. The definition of Japanese national holidays is based on this csv file provided by the Cabinet Office..
The holiday data is updated once a week by github action. Thereby, holiday data is included in the repository. Therefore, this tool can be used offline. If your PC is connected to the Internet, you can obtain the latest Japanese national holiday data by executing the following command.
$ cargo run -- -g=true
$ cargo fmt # dont't have to do it
# default
$ ./holidays_jp -d 20220101
20220101 is holiday(元日)
# the date format to pass as a arg
$ ./holidays_jp -d 2022/01/01 -f %Y/%m/%d
2022/01/01 is holiday(元日)
# help
$ ./target/release/holidays_jp -h
holidays_jp is determines holiday in Japan
Usage: holidays_jp [OPTIONS]
Options:
-d, --date <DATE> a date string, such as 20230211 (%Y%m%d) [default: ]
-g, --gen <BOOL> generates a new Japanese national holidays data [possible values: true, false]
-f, --dateformat <DATE_FORMAT> Specify the date format to pass as a command line argument [default: %Y%m%d]
-h, --help Print help
-V, --version Print version