NAME
list-idn-holidays - List Indonesian holidays in calendar
VERSION
This document describes version 0.064 of list-idn-holidays (from Perl distribution App-IndonesianHolidayUtils), released on 2021-07-24.
SYNOPSIS
Usage:
% list-idn-holidays [(--date-in=date)+] [--date-is=date] [--date-isnt=date] [--date-max=date] [--date-min=date] [(--date-not-in=date)+] [--date-xmax=date] [--date-xmin=date] [--date=date] [(--day-in=int)+] [--day-is=int] [--day-isnt=int] [--day-max=int] [--day-min=int] [(--day-not-in=int)+] [--day-xmax=int] [--day-xmin=int] [--day=int] [--decree-date-contains=str] [(--decree-date-in=str)+] [--decree-date-is=str] [--decree-date-isnt=str] [--decree-date-max=str] [--decree-date-min=str] [--decree-date-not-contains=str] [(--decree-date-not-in=str)+] [--decree-date-xmax=str] [--decree-date-xmin=str] [--decree-date=str] [--decree-note-contains=str] [(--decree-note-in=str)+] [--decree-note-is=str] [--decree-note-isnt=str] [--decree-note-max=str] [--decree-note-min=str] [--decree-note-not-contains=str] [(--decree-note-not-in=str)+] [--decree-note-xmax=str] [--decree-note-xmin=str] [--decree-note=str] [--detail|-l|--no-detail|--nodetail] [(--dow-in=int)+] [--dow-is=int] [--dow-isnt=int] [--dow-max=int] [--dow-min=int] [(--dow-not-in=int)+] [--dow-xmax=int] [--dow-xmin=int] [--dow=int] [(--exclude-field=str)+] [(--field=str)+] [--format=name|--json] [--is-holiday|--isnt-holiday] [--is-holiday-is] [--is-holiday-isnt] [--is-joint-leave|--isnt-joint-leave] [--is-joint-leave-is] [--is-joint-leave-isnt] [(--month-in=int)+] [--month-is=int] [--month-isnt=int] [--month-max=int] [--month-min=int] [(--month-not-in=int)+] [--month-xmax=int] [--month-xmin=int] [--(no)naked-res] [--note-contains=str] [(--note-in=str)+] [--note-is=str] [--note-isnt=str] [--note-max=str] [--note-min=str] [--note-not-contains=str] [(--note-not-in=str)+] [--note-xmax=str] [--note-xmin=str] [--note=str] [--page-result[=program]|--view-result[=program]] [--query=str] [--random|--no-random|--norandom] [--result-limit=int] [--result-start=int] [(--sort=str)+] [(--tags-has=str)+] [--tags-is=s] [--tags-isnt=s] [(--tags-lacks=str)+] [--tags=s] [--with-field-names|--without-field-names] [(--year-in=int)+] [--year-is=int] [--year-isnt=int] [--year-max=int] [--year-min=int] [(--year-not-in=int)+] [--year-xmax=int] [--year-xmin=int] [--date-in-json=json] [--date-not-in-json=json] [--day-in-json=json] [--day-not-in-json=json] [--decree-date-in-json=json] [--decree-date-not-in-json=json] [--decree-note-in-json=json] [--decree-note-not-in-json=json] [--dow-in-json=json] [--dow-not-in-json=json] [--exclude-fields-json=json] [--fields-json=json] [--month-in-json=json] [--month-not-in-json=json] [--note-in-json=json] [--note-not-in-json=json] [--sort-json=json] [--tags-has-json=json] [--tags-is-json=json] [--tags-isnt-json=json] [--tags-json=json] [--tags-lacks-json=json] [--year-in-json=json] [--year-not-in-json=json] [-q=str] [--isnt-holiday-is] [--isnt-holiday-isnt] [--isnt-joint-leave-is] [--isnt-joint-leave-isnt] -- [year] [month]
DESCRIPTION
List holidays and joint leave days ("cuti bersama").
Contains data from years 1990 to 2021
OPTIONS
*
marks required options.
Field selection options
- --detail, -l
-
Return array of full records instead of just ID fields.
By default, only the key (ID) field is returned per result entry.
- --exclude-field=s@
-
Select fields to return.
Can be specified multiple times.
- --exclude-fields-json=s
-
Select fields to return (JSON-encoded).
See
--exclude-field
. - --field=s@
-
Select fields to return.
Can be specified multiple times.
- --fields-json=s
-
Select fields to return (JSON-encoded).
See
--field
. - --with-field-names
-
Return field names in each record (as hash/associative array).
When enabled, function will return each record as hash/associative array (field name => value pairs). Otherwise, function will return each record as list/array (field value, field value, ...).
Filtering for date options
- --date-in-json=s
-
Only return records where the 'date' field is in the specified values (JSON-encoded).
See
--date-in
. - --date-in=s@
-
Only return records where the 'date' field is in the specified values.
Can be specified multiple times.
- --date-is=s
-
Only return records where the 'date' field equals specified value.
- --date-isnt=s
-
Only return records where the 'date' field does not equal specified value.
- --date-max=s
-
Only return records where the 'date' field is less than or equal to specified value.
- --date-min=s
-
Only return records where the 'date' field is greater than or equal to specified value.
- --date-not-in-json=s
-
Only return records where the 'date' field is not in the specified values (JSON-encoded).
See
--date-not-in
. - --date-not-in=s@
-
Only return records where the 'date' field is not in the specified values.
Can be specified multiple times.
- --date-xmax=s
-
Only return records where the 'date' field is less than specified value.
- --date-xmin=s
-
Only return records where the 'date' field is greater than specified value.
- --date=s
-
Only return records where the 'date' field equals specified value.
Filtering for day options
- --day-in-json=s
-
Only return records where the 'day' field is in the specified values (JSON-encoded).
See
--day-in
. - --day-in=s@
-
Only return records where the 'day' field is in the specified values.
Can be specified multiple times.
- --day-is=s
-
Only return records where the 'day' field equals specified value.
- --day-isnt=s
-
Only return records where the 'day' field does not equal specified value.
- --day-max=s
-
Only return records where the 'day' field is less than or equal to specified value.
- --day-min=s
-
Only return records where the 'day' field is greater than or equal to specified value.
- --day-not-in-json=s
-
Only return records where the 'day' field is not in the specified values (JSON-encoded).
See
--day-not-in
. - --day-not-in=s@
-
Only return records where the 'day' field is not in the specified values.
Can be specified multiple times.
- --day-xmax=s
-
Only return records where the 'day' field is less than specified value.
- --day-xmin=s
-
Only return records where the 'day' field is greater than specified value.
- --day=s
-
Only return records where the 'day' field equals specified value.
Filtering for decree_date options
- --decree-date-contains=s
-
Only return records where the 'decree_date' field contains specified text.
- --decree-date-in-json=s
-
Only return records where the 'decree_date' field is in the specified values (JSON-encoded).
See
--decree-date-in
. - --decree-date-in=s@
-
Only return records where the 'decree_date' field is in the specified values.
Can be specified multiple times.
- --decree-date-is=s
-
Only return records where the 'decree_date' field equals specified value.
- --decree-date-isnt=s
-
Only return records where the 'decree_date' field does not equal specified value.
- --decree-date-max=s
-
Only return records where the 'decree_date' field is less than or equal to specified value.
- --decree-date-min=s
-
Only return records where the 'decree_date' field is greater than or equal to specified value.
- --decree-date-not-contains=s
-
Only return records where the 'decree_date' field does not contain specified text.
- --decree-date-not-in-json=s
-
Only return records where the 'decree_date' field is not in the specified values (JSON-encoded).
See
--decree-date-not-in
. - --decree-date-not-in=s@
-
Only return records where the 'decree_date' field is not in the specified values.
Can be specified multiple times.
- --decree-date-xmax=s
-
Only return records where the 'decree_date' field is less than specified value.
- --decree-date-xmin=s
-
Only return records where the 'decree_date' field is greater than specified value.
- --decree-date=s
-
Only return records where the 'decree_date' field equals specified value.
Filtering for decree_note options
- --decree-note-contains=s
-
Only return records where the 'decree_note' field contains specified text.
- --decree-note-in-json=s
-
Only return records where the 'decree_note' field is in the specified values (JSON-encoded).
See
--decree-note-in
. - --decree-note-in=s@
-
Only return records where the 'decree_note' field is in the specified values.
Can be specified multiple times.
- --decree-note-is=s
-
Only return records where the 'decree_note' field equals specified value.
- --decree-note-isnt=s
-
Only return records where the 'decree_note' field does not equal specified value.
- --decree-note-max=s
-
Only return records where the 'decree_note' field is less than or equal to specified value.
- --decree-note-min=s
-
Only return records where the 'decree_note' field is greater than or equal to specified value.
- --decree-note-not-contains=s
-
Only return records where the 'decree_note' field does not contain specified text.
- --decree-note-not-in-json=s
-
Only return records where the 'decree_note' field is not in the specified values (JSON-encoded).
See
--decree-note-not-in
. - --decree-note-not-in=s@
-
Only return records where the 'decree_note' field is not in the specified values.
Can be specified multiple times.
- --decree-note-xmax=s
-
Only return records where the 'decree_note' field is less than specified value.
- --decree-note-xmin=s
-
Only return records where the 'decree_note' field is greater than specified value.
- --decree-note=s
-
Only return records where the 'decree_note' field equals specified value.
Filtering for dow options
- --dow-in-json=s
-
Only return records where the 'dow' field is in the specified values (JSON-encoded).
See
--dow-in
. - --dow-in=s@
-
Only return records where the 'dow' field is in the specified values.
Can be specified multiple times.
- --dow-is=s
-
Only return records where the 'dow' field equals specified value.
- --dow-isnt=s
-
Only return records where the 'dow' field does not equal specified value.
- --dow-max=s
-
Only return records where the 'dow' field is less than or equal to specified value.
- --dow-min=s
-
Only return records where the 'dow' field is greater than or equal to specified value.
- --dow-not-in-json=s
-
Only return records where the 'dow' field is not in the specified values (JSON-encoded).
See
--dow-not-in
. - --dow-not-in=s@
-
Only return records where the 'dow' field is not in the specified values.
Can be specified multiple times.
- --dow-xmax=s
-
Only return records where the 'dow' field is less than specified value.
- --dow-xmin=s
-
Only return records where the 'dow' field is greater than specified value.
- --dow=s
-
Only return records where the 'dow' field equals specified value.
Filtering for is_holiday options
- --is-holiday
-
Only return records where the 'is_holiday' field equals specified value.
- --is-holiday-is
-
Only return records where the 'is_holiday' field equals specified value.
- --is-holiday-isnt
-
Only return records where the 'is_holiday' field does not equal specified value.
Filtering for is_joint_leave options
- --is-joint-leave
-
Only return records where the 'is_joint_leave' field equals specified value.
- --is-joint-leave-is
-
Only return records where the 'is_joint_leave' field equals specified value.
- --is-joint-leave-isnt
-
Only return records where the 'is_joint_leave' field does not equal specified value.
Filtering for month options
- --month-in-json=s
-
Only return records where the 'month' field is in the specified values (JSON-encoded).
See
--month-in
. - --month-in=s@
-
Only return records where the 'month' field is in the specified values.
Can be specified multiple times.
- --month-is=s
-
Only return records where the 'month' field equals specified value.
- --month-isnt=s
-
Only return records where the 'month' field does not equal specified value.
- --month-max=s
-
Only return records where the 'month' field is less than or equal to specified value.
- --month-min=s
-
Only return records where the 'month' field is greater than or equal to specified value.
- --month-not-in-json=s
-
Only return records where the 'month' field is not in the specified values (JSON-encoded).
See
--month-not-in
. - --month-not-in=s@
-
Only return records where the 'month' field is not in the specified values.
Can be specified multiple times.
- --month-xmax=s
-
Only return records where the 'month' field is less than specified value.
- --month-xmin=s
-
Only return records where the 'month' field is greater than specified value.
- --month=s
-
Only return records where the 'month' field equals specified value.
Can also be specified as the 2nd command-line argument.
Filtering for note options
- --note-contains=s
-
Only return records where the 'note' field contains specified text.
- --note-in-json=s
-
Only return records where the 'note' field is in the specified values (JSON-encoded).
See
--note-in
. - --note-in=s@
-
Only return records where the 'note' field is in the specified values.
Can be specified multiple times.
- --note-is=s
-
Only return records where the 'note' field equals specified value.
- --note-isnt=s
-
Only return records where the 'note' field does not equal specified value.
- --note-max=s
-
Only return records where the 'note' field is less than or equal to specified value.
- --note-min=s
-
Only return records where the 'note' field is greater than or equal to specified value.
- --note-not-contains=s
-
Only return records where the 'note' field does not contain specified text.
- --note-not-in-json=s
-
Only return records where the 'note' field is not in the specified values (JSON-encoded).
See
--note-not-in
. - --note-not-in=s@
-
Only return records where the 'note' field is not in the specified values.
Can be specified multiple times.
- --note-xmax=s
-
Only return records where the 'note' field is less than specified value.
- --note-xmin=s
-
Only return records where the 'note' field is greater than specified value.
- --note=s
-
Only return records where the 'note' field equals specified value.
Filtering for tags options
-
Only return records where the 'tags' field is an array/list which contains specified value (JSON-encoded).
See
--tags-has
. -
Only return records where the 'tags' field is an array/list which contains specified value.
Can be specified multiple times.
-
Only return records where the 'tags' field equals specified value (JSON-encoded).
See
--tags-is
. -
Only return records where the 'tags' field equals specified value.
-
Only return records where the 'tags' field does not equal specified value (JSON-encoded).
See
--tags-isnt
. -
Only return records where the 'tags' field does not equal specified value.
-
Only return records where the 'tags' field equals specified value (JSON-encoded).
See
--tags
. -
Only return records where the 'tags' field is an array/list which does not contain specified value (JSON-encoded).
See
--tags-lacks
. -
Only return records where the 'tags' field is an array/list which does not contain specified value.
Can be specified multiple times.
-
Only return records where the 'tags' field equals specified value.
Filtering for year options
- --year-in-json=s
-
Only return records where the 'year' field is in the specified values (JSON-encoded).
See
--year-in
. - --year-in=s@
-
Only return records where the 'year' field is in the specified values.
Can be specified multiple times.
- --year-is=s
-
Only return records where the 'year' field equals specified value.
- --year-isnt=s
-
Only return records where the 'year' field does not equal specified value.
- --year-max=s
-
Only return records where the 'year' field is less than or equal to specified value.
- --year-min=s
-
Only return records where the 'year' field is greater than or equal to specified value.
- --year-not-in-json=s
-
Only return records where the 'year' field is not in the specified values (JSON-encoded).
See
--year-not-in
. - --year-not-in=s@
-
Only return records where the 'year' field is not in the specified values.
Can be specified multiple times.
- --year-xmax=s
-
Only return records where the 'year' field is less than specified value.
- --year-xmin=s
-
Only return records where the 'year' field is greater than specified value.
- --year=s
-
Only return records where the 'year' field equals specified value.
Can also be specified as the 1st command-line argument.
Filtering options
Ordering options
- --random
-
Return records in random order.
- --sort-json=s
-
Order records according to certain field(s) (JSON-encoded).
See
--sort
. - --sort=s@
-
Order records according to certain field(s).
A list of field names separated by comma. Each field can be prefixed with '-' to specify descending order instead of the default ascending.
Can be specified multiple times.
Output options
- --format=s
-
Choose output format, e.g. json, text.
Default value:
undef
- --json
-
Set output format to json.
- --naked-res
-
When outputing as JSON, strip result envelope.
Default value:
0
By default, when outputing as JSON, the full enveloped result is returned, e.g.:
[200,"OK",[1,2,3],{"func.extra"=>4}]
The reason is so you can get the status (1st element), status message (2nd element) as well as result metadata/extra result (4th element) instead of just the result (3rd element). However, sometimes you want just the result, e.g. when you want to pipe the result for more post-processing. In this case you can use `--naked-res` so you just get:
[1,2,3]
- --page-result
-
Filter output through a pager.
- --view-result
-
View output using a viewer.
Paging options
- --result-limit=s
-
Only return a certain number of records.
- --result-start=s
-
Only return starting from the n'th record.
Default value:
1
Other options
COMPLETION
This script has shell tab completion capability with support for several shells.
bash
To activate bash completion for this script, put:
complete -C list-idn-holidays list-idn-holidays
in your bash startup (e.g. ~/.bashrc). Your next shell session will then recognize tab completion for the command. Or, you can also directly execute the line above in your shell to activate immediately.
It is recommended, however, that you install modules using cpanm-shcompgen which can activate shell completion for scripts immediately.
tcsh
To activate tcsh completion for this script, put:
complete list-idn-holidays 'p/*/`list-idn-holidays`/'
in your tcsh startup (e.g. ~/.tcshrc). Your next shell session will then recognize tab completion for the command. Or, you can also directly execute the line above in your shell to activate immediately.
It is also recommended to install shcompgen (see above).
other shells
For fish and zsh, install shcompgen as described above.
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/App-IndonesianHolidayUtils.
SOURCE
Source repository is at https://github.com/perlancar/perl-App-IndonesianHolidayUtils.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-IndonesianHolidayUtils
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2021, 2016, 2015 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.