<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    Calendar::Indonesia::Holiday - List Indonesian public holidays

VERSION
    version 0.17

SYNOPSIS
     use Calendar::Indonesia::Holiday qw(
         list_id_holidays
         enum_id_workdays
         count_id_workdays
     );

     # list Indonesian holidays for the year 2011, without the joint leave days
     # ("cuti bersama"), show only the dates

     my $res = list_id_holidays(year =&gt; 2011, is_joint_leave=&gt;0);
     # sample result
     [200, "OK", [
       '2011-01-01',
       '2011-02-03',
       '2011-02-16',
       '2011-03-05',
       '2011-04-22',
       '2011-05-17',
       '2011-06-02',
       '2011-06-29',
       '2011-08-17',
       '2011-08-31',
       '2011-09-01',
       '2011-11-07',
       '2011-11-27',
       '2011-12-25',
     ]];

     # list religious Indonesian holidays, show full details
     my $res = list_id_holidays(year =&gt; 2011,
                                "tags.has" =&gt; ['religious'], detail=&gt;1);

     # sample result
     [200, "OK", [
       {date        =&gt; '2011-02-16',
        day         =&gt; 16,
        month       =&gt; 2,
        year        =&gt; 2011,
        ind_name    =&gt; 'Maulid Nabi Muhammad',
        eng_name    =&gt; 'Mawlid',
        eng_aliases =&gt; ['Mawlid An-Nabi'],
        ind_aliases =&gt; ['Maulud'],
        is_holiday  =&gt; 1,
        tags        =&gt; [qw/religious religion=islam calendar=lunar/],
       },
       ...
     ]];

     # check whether 2011-02-16 is a holiday
     my $res = list_id_holidays(date =&gt; '2011-02-16');
     print "2011-02-16 is a holiday\n" if @{$res-&gt;[2]};

     # enumerate working days for a certain period
     my $res = enum_id_workdays(year=&gt;2011, month=&gt;7);

     # idem, but returns a number instead. year/month defaults to current
     # year/month.
     my $res = count_id_workdays();

DESCRIPTION
    This module provides functions to list Indonesian holidays.

    This module uses Log::Any logging framework.

    This module has Rinci metadata.

FUNCTIONS
  count_id_workdays(%args) -&gt; [status, msg, result, meta]
    Count working days for a certain period.

    Working day is defined as day that is not Saturday*/Sunday/holiday/joint
    leave days*. If work*saturdays is set to true, Saturdays are also
    counted as working days. If observe*joint_leaves is set to false, joint
    leave days are also counted as working days.

    Contains data from years 2002 to 2014 (joint leave days until 2014).

    Arguments ('*' denotes required arguments):

    *   end_date =&gt; *str*

        End date.

        Defaults to end of current month. Either a string in the form of
        "YYYY-MM-DD", or a DateTime object, is accepted.

    *   observe_joint_leaves =&gt; *bool* (default: 1)

        If set to 0, do not observe joint leave as holidays.

    *   start_date =&gt; *str*

        Starting date.

        Defaults to start of current month. Either a string in the form of
        "YYYY-MM-DD", or a DateTime object, is accepted.

    *   work_saturdays =&gt; *bool* (default: 0)

        If set to 1, Saturday is a working day.

    Return value:

    Returns an enveloped result (an array).

    First element (status) is an integer containing HTTP status code (200
    means OK, 4xx caller error, 5xx function error). Second element (msg) is
    a string containing error message, or 'OK' if status is 200. Third
    element (result) is optional, the actual result. Fourth element (meta)
    is called result metadata and is optional, a hash that contains extra
    information.

  enum_id_workdays(%args) -&gt; [status, msg, result, meta]
    Enumerate working days for a certain period.

    Working day is defined as day that is not Saturday*/Sunday/holiday/joint
    leave days*. If work*saturdays is set to true, Saturdays are also
    counted as working days. If observe*joint_leaves is set to false, joint
    leave days are also counted as working days.

    Contains data from years 2002 to 2014 (joint leave days until 2014).

    Arguments ('*' denotes required arguments):

    *   end_date =&gt; *str*

        End date.

        Defaults to end of current month. Either a string in the form of
        "YYYY-MM-DD", or a DateTime object, is accepted.

    *   observe_joint_leaves =&gt; *bool* (default: 1)

        If set to 0, do not observe joint leave as holidays.

    *   start_date =&gt; *str*

        Starting date.

        Defaults to start of current month. Either a string in the form of
        "YYYY-MM-DD", or a DateTime object, is accepted.

    *   work_saturdays =&gt; *bool* (default: 0)

        If set to 1, Saturday is a working day.

    Return value:

    Returns an enveloped result (an array).

    First element (status) is an integer containing HTTP status code (200
    means OK, 4xx caller error, 5xx function error). Second element (msg) is
    a string containing error message, or 'OK' if status is 200. Third
    element (result) is optional, the actual result. Fourth element (meta)
    is called result metadata and is optional, a hash that contains extra
    information.

  list_id_holidays(%args) -&gt; [status, msg, result, meta]
    List Indonesian holidays in calendar.

    List holidays and joint leave days ("cuti bersama").

    Contains data from years 2002 to 2014 (joint leave days until 2014).

    Arguments ('*' denotes required arguments):

    *   date =&gt; *str*

        Only return records where the 'date' field equals specified value.

    *   date.contains =&gt; *str*

        Only return records where the 'date' field contains specified text.

    *   date.in =&gt; *array*

        Only return records where the 'date' field is in the specified
        values.

    *   date.is =&gt; *str*

        Only return records where the 'date' field equals specified value.

    *   date.isnt =&gt; *str*

        Only return records where the 'date' field does not equal specified
        value.

    *   date.max =&gt; *str*

        Only return records where the 'date' field is less than or equal to
        specified value.

    *   date.min =&gt; *str*

        Only return records where the 'date' field is greater than or equal
        to specified value.

    *   date.not_contains =&gt; *str*

        Only return records where the 'date' field does not contain
        specified text.

    *   date.not_in =&gt; *array*

        Only return records where the 'date' field is not in the specified
        values.

    *   date.xmax =&gt; *str*

        Only return records where the 'date' field is less than specified
        value.

    *   date.xmin =&gt; *str*

        Only return records where the 'date' field is greater than specified
        value.

    *   day =&gt; *int*

        Only return records where the 'day' field equals specified value.

    *   day.in =&gt; *array*

        Only return records where the 'day' field is in the specified
        values.

    *   day.is =&gt; *int*

        Only return records where the 'day' field equals specified value.

    *   day.isnt =&gt; *int*

        Only return records where the 'day' field does not equal specified
        value.

    *   day.max =&gt; *int*

        Only return records where the 'day' field is less than or equal to
        specified value.

    *   day.min =&gt; *int*

        Only return records where the 'day' field is greater than or equal
        to specified value.

    *   day.not_in =&gt; *array*

        Only return records where the 'day' field is not in the specified
        values.

    *   day.xmax =&gt; *int*

        Only return records where the 'day' field is less than specified
        value.

    *   day.xmin =&gt; *int*

        Only return records where the 'day' field is greater than specified
        value.

    *   decree_date =&gt; *str*

        Only return records where the 'decree_date' field equals specified
        value.

    *   decree_date.contains =&gt; *str*

        Only return records where the 'decree_date' field contains specified
        text.

    *   decree_date.in =&gt; *array*

        Only return records where the 'decree_date' field is in the
        specified values.

    *   decree_date.is =&gt; *str*

        Only return records where the 'decree_date' field equals specified
        value.

    *   decree_date.isnt =&gt; *str*

        Only return records where the 'decree_date' field does not equal
        specified value.

    *   decree_date.max =&gt; *str*

        Only return records where the 'decree_date' field is less than or
        equal to specified value.

    *   decree_date.min =&gt; *str*

        Only return records where the 'decree_date' field is greater than or
        equal to specified value.

    *   decree_date.not_contains =&gt; *str*

        Only return records where the 'decree_date' field does not contain
        specified text.

    *   decree_date.not_in =&gt; *array*

        Only return records where the 'decree_date' field is not in the
        specified values.

    *   decree_date.xmax =&gt; *str*

        Only return records where the 'decree_date' field is less than
        specified value.

    *   decree_date.xmin =&gt; *str*

        Only return records where the 'decree_date' field is greater than
        specified value.

    *   decree_note =&gt; *str*

        Only return records where the 'decree_note' field equals specified
        value.

    *   decree_note.contains =&gt; *str*

        Only return records where the 'decree_note' field contains specified
        text.

    *   decree_note.in =&gt; *array*

        Only return records where the 'decree_note' field is in the
        specified values.

    *   decree_note.is =&gt; *str*

        Only return records where the 'decree_note' field equals specified
        value.

    *   decree_note.isnt =&gt; *str*

        Only return records where the 'decree_note' field does not equal
        specified value.

    *   decree_note.max =&gt; *str*

        Only return records where the 'decree_note' field is less than or
        equal to specified value.

    *   decree_note.min =&gt; *str*

        Only return records where the 'decree_note' field is greater than or
        equal to specified value.

    *   decree_note.not_contains =&gt; *str*

        Only return records where the 'decree_note' field does not contain
        specified text.

    *   decree_note.not_in =&gt; *array*

        Only return records where the 'decree_note' field is not in the
        specified values.

    *   decree_note.xmax =&gt; *str*

        Only return records where the 'decree_note' field is less than
        specified value.

    *   decree_note.xmin =&gt; *str*

        Only return records where the 'decree_note' field is greater than
        specified value.

    *   detail =&gt; *bool* (default: 0)

        Return array of full records instead of just ID fields.

        By default, only the key (ID) field is returned per result entry.

    *   dow =&gt; *int*

        Only return records where the 'dow' field equals specified value.

    *   dow.in =&gt; *array*

        Only return records where the 'dow' field is in the specified
        values.

    *   dow.is =&gt; *int*

        Only return records where the 'dow' field equals specified value.

    *   dow.isnt =&gt; *int*

        Only return records where the 'dow' field does not equal specified
        value.

    *   dow.max =&gt; *int*

        Only return records where the 'dow' field is less than or equal to
        specified value.

    *   dow.min =&gt; *int*

        Only return records where the 'dow' field is greater than or equal
        to specified value.

    *   dow.not_in =&gt; *array*

        Only return records where the 'dow' field is not in the specified
        values.

    *   dow.xmax =&gt; *int*

        Only return records where the 'dow' field is less than specified
        value.

    *   dow.xmin =&gt; *int*

        Only return records where the 'dow' field is greater than specified
        value.

    *   fields =&gt; *array*

        Select fields to return.

    *   is_holiday =&gt; *bool*

        Only return records where the 'is_holiday' field equals specified
        value.

    *   is_holiday.is =&gt; *bool*

        Only return records where the 'is_holiday' field equals specified
        value.

    *   is_holiday.isnt =&gt; *bool*

        Only return records where the 'is_holiday' field does not equal
        specified value.

    *   is_joint_leave =&gt; *bool*

        Only return records where the 'is_joint_leave' field equals
        specified value.

    *   is_joint_leave.is =&gt; *bool*

        Only return records where the 'is_joint_leave' field equals
        specified value.

    *   is_joint_leave.isnt =&gt; *bool*

        Only return records where the 'is_joint_leave' field does not equal
        specified value.

    *   month =&gt; *int*

        Only return records where the 'month' field equals specified value.

    *   month.in =&gt; *array*

        Only return records where the 'month' field is in the specified
        values.

    *   month.is =&gt; *int*

        Only return records where the 'month' field equals specified value.

    *   month.isnt =&gt; *int*

        Only return records where the 'month' field does not equal specified
        value.

    *   month.max =&gt; *int*

        Only return records where the 'month' field is less than or equal to
        specified value.

    *   month.min =&gt; *int*

        Only return records where the 'month' field is greater than or equal
        to specified value.

    *   month.not_in =&gt; *array*

        Only return records where the 'month' field is not in the specified
        values.

    *   month.xmax =&gt; *int*

        Only return records where the 'month' field is less than specified
        value.

    *   month.xmin =&gt; *int*

        Only return records where the 'month' field is greater than
        specified value.

    *   note =&gt; *str*

        Only return records where the 'note' field equals specified value.

    *   note.contains =&gt; *str*

        Only return records where the 'note' field contains specified text.

    *   note.in =&gt; *array*

        Only return records where the 'note' field is in the specified
        values.

    *   note.is =&gt; *str*

        Only return records where the 'note' field equals specified value.

    *   note.isnt =&gt; *str*

        Only return records where the 'note' field does not equal specified
        value.

    *   note.max =&gt; *str*

        Only return records where the 'note' field is less than or equal to
        specified value.

    *   note.min =&gt; *str*

        Only return records where the 'note' field is greater than or equal
        to specified value.

    *   note.not_contains =&gt; *str*

        Only return records where the 'note' field does not contain
        specified text.

    *   note.not_in =&gt; *array*

        Only return records where the 'note' field is not in the specified
        values.

    *   note.xmax =&gt; *str*

        Only return records where the 'note' field is less than specified
        value.

    *   note.xmin =&gt; *str*

        Only return records where the 'note' field is greater than specified
        value.

    *   q =&gt; *str*

        Search.

    *   random =&gt; *bool* (default: 0)

        Return records in random order.

    *   result_limit =&gt; *int*

        Only return a certain number of records.

    *   result_start =&gt; *int* (default: 1)

        Only return starting from the n'th record.

    *   sort =&gt; *str*

        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.

    *   tags =&gt; *array*

        Only return records where the 'tags' field equals specified value.

    *   tags.has =&gt; *array*

        Only return records where the 'tags' field is an array/list which
        contains specified value.

    *   tags.is =&gt; *array*

        Only return records where the 'tags' field equals specified value.

    *   tags.isnt =&gt; *array*

        Only return records where the 'tags' field does not equal specified
        value.

    *   tags.lacks =&gt; *array*

        Only return records where the 'tags' field is an array/list which
        does not contain specified value.

    *   with_field_names =&gt; *bool*

        Return field names in each record (as hash/associative array).

        When enabled, function will return each record as hash/associative
        array (field name =&gt; value pairs). Otherwise, function will return
        each record as list/array (field value, field value, ...).

    *   year =&gt; *int*

        Only return records where the 'year' field equals specified value.

    *   year.in =&gt; *array*

        Only return records where the 'year' field is in the specified
        values.

    *   year.is =&gt; *int*

        Only return records where the 'year' field equals specified value.

    *   year.isnt =&gt; *int*

        Only return records where the 'year' field does not equal specified
        value.

    *   year.max =&gt; *int*

        Only return records where the 'year' field is less than or equal to
        specified value.

    *   year.min =&gt; *int*

        Only return records where the 'year' field is greater than or equal
        to specified value.

    *   year.not_in =&gt; *array*

        Only return records where the 'year' field is not in the specified
        values.

    *   year.xmax =&gt; *int*

        Only return records where the 'year' field is less than specified
        value.

    *   year.xmin =&gt; *int*

        Only return records where the 'year' field is greater than specified
        value.

    Return value:

    Returns an enveloped result (an array).

    First element (status) is an integer containing HTTP status code (200
    means OK, 4xx caller error, 5xx function error). Second element (msg) is
    a string containing error message, or 'OK' if status is 200. Third
    element (result) is optional, the actual result. Fourth element (meta)
    is called result metadata and is optional, a hash that contains extra
    information.

FAQ
  What is "joint leave"?
    Workers are normally granted 12 days of paid leave per year. They are
    free to spend it on whichever days they want. The joint leave ("cuti
    bersama") is a government program of recent years (since 2002) to
    recommend that some of these leave days be spent together nationally on
    certain days, especially during Lebaran (Eid Ul-Fitr). It is not
    mandated, but many do follow it anyway, e.g. government civil workers,
    banks, etc. I am marking joint leave days with is_joint_leave=1 and
    is_holiday=0, while the holidays themselves with is_holiday=1, so you
    can differentiate/select both/either one.

  Holidays before 2002?
    Will be provided if there is demand and data source.

  Holidays after (current year)+1?
    Some religious holidays, especially Vesakha, are not determined yet.
    Joint leave days are also usually decreed by the government in May/June
    of the preceding year.

SEE ALSO
    This API will also be available on GudangAPI, http://gudangapi.com/

    Aside from national holidays, some provinces declare their own (e.g.
    governor election day for East Java province, etc).

HOMEPAGE
    Please visit the project's homepage at
    &lt;https://metacpan.org/release/Calendar-Indonesia-Holiday&gt;.

SOURCE
    Source repository is at
    &lt;https://github.com/sharyanto/perl-Calendar-Indonesia-Holiday&gt;.

BUGS
    Please report any bugs or feature requests on the bugtracker website
    &lt;https://rt.cpan.org/Public/Dist/Display.html?Name=Calendar-Indonesia-Ho
    liday&gt;

    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
    Steven Haryanto &lt;stevenharyanto@gmail.com&gt;

COPYRIGHT AND LICENSE
    This software is copyright (c) 2014 by Steven Haryanto.

    This is free software; you can redistribute it and/or modify it under
    the same terms as the Perl 5 programming language system itself.

</pre></body></html>