NAME
list-idn-holidays - List Indonesian holidays in calendar
VERSION
This document describes version 0.063 of list-idn-holidays (from Perl distribution App-IndonesianHolidayUtils), released on 2021-03-15.
SYNOPSIS
Usage:
% list-idn-holidays [--date-in-json=s] [--date-in=s+] [--date-is=s]
[--date-isnt=s] [--date-max=s] [--date-min=s] [--date-not-in-json=s]
[--date-not-in=s+] [--date-xmax=s] [--date-xmin=s] [--date=s]
[--day-in-json=s] [--day-in=s+] [--day-is=s] [--day-isnt=s]
[--day-max=s] [--day-min=s] [--day-not-in-json=s] [--day-not-in=s+]
[--day-xmax=s] [--day-xmin=s] [--day=s] [--decree-date-contains=s]
[--decree-date-in-json=s] [--decree-date-in=s+] [--decree-date-is=s]
[--decree-date-isnt=s] [--decree-date-max=s] [--decree-date-min=s]
[--decree-date-not-contains=s] [--decree-date-not-in-json=s]
[--decree-date-not-in=s+] [--decree-date-xmax=s]
[--decree-date-xmin=s] [--decree-date=s] [--decree-note-contains=s]
[--decree-note-in-json=s] [--decree-note-in=s+] [--decree-note-is=s]
[--decree-note-isnt=s] [--decree-note-max=s] [--decree-note-min=s]
[--decree-note-not-contains=s] [--decree-note-not-in-json=s]
[--decree-note-not-in=s+] [--decree-note-xmax=s]
[--decree-note-xmin=s] [--decree-note=s] [--detail] [--dow-in-json=s]
[--dow-in=s+] [--dow-is=s] [--dow-isnt=s] [--dow-max=s] [--dow-min=s]
[--dow-not-in-json=s] [--dow-not-in=s+] [--dow-xmax=s] [--dow-xmin=s]
[--dow=s] [--exclude-field=s+] [--exclude-fields-json=s] [--field=s+]
[--fields-json=s] [--format=name] [--is-holiday] [--is-holiday-is]
[--is-holiday-isnt] [--is-joint-leave] [--is-joint-leave-is]
[--is-joint-leave-isnt] [--isnt-holiday] [--isnt-holiday-is]
[--isnt-holiday-isnt] [--isnt-joint-leave] [--isnt-joint-leave-is]
[--isnt-joint-leave-isnt] [--json] [-l] [--month-in-json=s]
[--month-in=s+] [--month-is=s] [--month-isnt=s] [--month-max=s]
[--month-min=s] [--month-not-in-json=s] [--month-not-in=s+]
[--month-xmax=s] [--month-xmin=s] [--(no)naked-res] [--no-detail]
[--no-random] [--nodetail] [--norandom] [--note-contains=s]
[--note-in-json=s] [--note-in=s+] [--note-is=s] [--note-isnt=s]
[--note-max=s] [--note-min=s] [--note-not-contains=s]
[--note-not-in-json=s] [--note-not-in=s+] [--note-xmax=s]
[--note-xmin=s] [--note=s] [--page-result[=program]] [--random]
[--result-limit=s] [--result-start=s] [--sort-json=s] [--sort=s+]
[--tags-has-json=s] [--tags-has=s+] [--tags-is-json=s] [--tags-is=s]
[--tags-isnt-json=s] [--tags-isnt=s] [--tags-json=s]
[--tags-lacks-json=s] [--tags-lacks=s+] [--tags=s]
[--view-result[=program]] [--with-field-names] [--without-field-names]
[--year-in-json=s] [--year-in=s+] [--year-is=s] [--year-isnt=s]
[--year-max=s] [--year-min=s] [--year-not-in-json=s]
[--year-not-in=s+] [--year-xmax=s] [--year-xmin=s] [--year=s] [query]
[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.
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.
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://github.com/perlancar/perl-App-IndonesianHolidayUtils/issues
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.