Workdate objects allow date calculations to be
made on a calendar that considers workdays (also called "business days").
Built on top of the
Date datatype, it uses a calendar file to specify how
many days a workweek has and which days are to be considered holidays.
By default, the workweek is composed of Monday, Tuesday, Wednesday,
Thursday, and Friday. Saturday and Sunday form the weekend.
Although most countries have a Monday to Friday workweek, some have very
More information about workweeks can be found at
# construct a default workday calendar
my $calendar = WorkdayCalendar.new;
# work out the next workday away from the given date
# 2016-11-18 is a Friday
$calendar.workdays-away(Date.new('2016-11-18'), 1); # 2016-11-21
# construct a workday calendar from a file
my $calendar-from-file = WorkdayCalendar.new('days.cal');
# create a workdate from a date string
my $workdate = Workdate.new('2016-05-02');
# create a workdate from a Date object
my $date = Date.new('2016-11-18');
my $workdate-from-date = Workdate.new($date);
# is the day a workday?
$workdate = Workdate.new('2016-11-18');
$workdate.is-workday; # True
$workdate.is-weekend; # False
$workdate.is-holiday; # False
Detailed documentation is available in the source code's
Comments, ideas and issues can be submitted to the GitHub issue
or discussed on the #perl6 channel on irc.freenode.net.
zef install Date::WorkdayCalendar
To develop the code, clone the source code repository from GitHub:
git clone firstname.lastname@example.org:raku-community-modules/Date-WorkdayCalendar.git
To run the test suite on a local copy of the source code, use the following
prove -r --exec="raku -Ilib" t/
The original author of the module was shinobi email@example.com. The
module is now maintained by The Raku Community.
Copyright and License
Copyright 2012-2013 shinobi firstname.lastname@example.org
Copyright 2014-2016 The Raku Community
This program is distributed under the terms of the Artistic License 2.0.
For further information, please see the LICENSE file or visit