Skip Menu |
 

This queue is for tickets about the DateTime-BusinessHours CPAN distribution.

Report information
The Basics
Id: 82343
Status: open
Priority: 0/
Queue: DateTime-BusinessHours

People
Owner: Nobody in particular
Requestors: steve [...] deefs.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Allow 24-hour weekdays
Download (untitled) / with headers
text/plain 459b
I have a use case where the "work hours" are midnight to midnight, Monday to Friday, minus holidays. I can enter the weekends and holidays, but there doesn't seem to be a way to tell the module not to limit the working hours during the week, as far as I can tell. I can enter "0000" and "2359" as an approximation (undocumented), but this is still a minute short. Am I missing something? If this is not currently possible, could it be added, please?
From: bitcard [...] 32ths.com
Download (untitled) / with headers
text/plain 719b
On Sun Dec 30 19:18:16 2012, SSIMMS wrote: Show quoted text
> I have a use case where the "work hours" are midnight to midnight, Monday > to Friday, minus holidays. I can enter the weekends and holidays, but > there doesn't seem to be a way to tell the module not to limit the working > hours during the week, as far as I can tell. I can enter "0000" and > "2359" as an approximation (undocumented), but this is still a minute > short. > > Am I missing something? If this is not currently possible, could it be > added, please?
Hi, When you specify 0000 to 2359, does it mess up the business hour calculations somehow? Can you produce a small test example that will make the module fail to calculate business hours properly?
Download (untitled) / with headers
text/plain 791b
On Tue Nov 12 12:33:11 2013, xmikew wrote: Show quoted text
> When you specify 0000 to 2359, does it mess up the business hour > calculations somehow? Can you produce a small test example that will > make the module fail to calculate business hours properly?
Here you go: use Test::More tests => 1; use DateTime; use DateTime::BusinessHours; # Thursday my $d1 = DateTime->new(year => 2014, month => 2, day => 20, hour => 9, minute => 0, second => 0); # Friday my $d2 = DateTime->new(year => 2014, month => 2, day => 21, hour => 9, minute => 0, second => 0); my $test = DateTime::BusinessHours->new( datetime1 => $d1, datetime2 => $d2, worktiming => ['0000', '2359'], ); is($test->gethours(), 24, q{Allow round-the-clock work on weekdays});


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.