[Bps-public-commit] Business-Hours branch, master, updated. 0.11-9-g85ec078

Ruslan Zakirov ruz at bestpractical.com
Thu Aug 22 10:41:05 EDT 2013


The branch, master has been updated
       via  85ec07876b0262e482329fb0747ddcf3ec23bdb0 (commit)
       via  3f7902bf988dced4767f1ebe8528d66b505d3bd0 (commit)
       via  89c9ceb956194f98717c36e4544aec409a4c0610 (commit)
       via  c28dc6d6d355b920afcc330049ecf06f2bb2745f (commit)
       via  e33eeaabfb5f849b1f006dab873ecba151a2d4f2 (commit)
       via  b975d72815f156114bf0a872f16f6b3cf23f881c (commit)
       via  164c7e1c3f0ea53ce4b3df9f41e1554fd6b3ec71 (commit)
       via  9531ab1f2d858f69b99c176cf29815c676c6ff82 (commit)
       via  951864af149c8548e3aec3dee197cb67215a69ce (commit)
      from  336afdbd453cba58c11524fd8e5520a12dcf3686 (commit)

Summary of changes:
 Changes               |   4 ++
 META.yml              |   1 +
 Makefile.PL           |   2 +-
 lib/Business/Hours.pm | 176 +++++++++++++++++++++-----------------------------
 4 files changed, 80 insertions(+), 103 deletions(-)

- Log -----------------------------------------------------------------
commit 951864af149c8548e3aec3dee197cb67215a69ce
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Nov 24 15:44:03 2011 +0400

    retab, replace with spaces

diff --git a/lib/Business/Hours.pm b/lib/Business/Hours.pm
index 28704cf..07850d1 100644
--- a/lib/Business/Hours.pm
+++ b/lib/Business/Hours.pm
@@ -225,7 +225,7 @@ sub for_timespan {
 
     # Split the Start and End times into hour/minute specifications
     foreach my $day ( keys %$bizdays ) {
-	# Kept for (retro)compatibility
+        # Kept for (retro)compatibility
         my $day_href = $bizdays->{$day};
         foreach my $which (qw(Start End)) {
             if (   $day_href->{$which}
@@ -235,23 +235,23 @@ sub for_timespan {
                 $day_href->{ $which . 'Minute' } = $2;
             }
         }
-	# Processing each period
-	if ($bizdays->{$day}->{'Breaks'}) {
-	    my $i = 0;
-	    for ($i = 0; $i < @{$bizdays->{$day}->{'Breaks'}}; $i++) {
-		if ($bizdays->{$day}->{'Breaks'}[$i]) {
-		    my $day_href = $bizdays->{$day}->{'Breaks'}[$i];
-		    foreach my $which (qw(Start End)) {
-			if (   $day_href->{$which}
-			       && $day_href->{$which} =~ /^(\d+)\D(\d+)$/ )
-			{
-			    $day_href->{ $which . 'Hour' }   = $1;
-			    $day_href->{ $which . 'Minute' } = $2;
-			}
-		    }
-		}
-	    }
-	}
+        # Processing each period
+        if ($bizdays->{$day}->{'Breaks'}) {
+            my $i = 0;
+            for ($i = 0; $i < @{$bizdays->{$day}->{'Breaks'}}; $i++) {
+                if ($bizdays->{$day}->{'Breaks'}[$i]) {
+                    my $day_href = $bizdays->{$day}->{'Breaks'}[$i];
+                    foreach my $which (qw(Start End)) {
+                        if (   $day_href->{$which}
+                               && $day_href->{$which} =~ /^(\d+)\D(\d+)$/ )
+                        {
+                            $day_href->{ $which . 'Hour' }   = $1;
+                            $day_href->{ $which . 'Minute' } = $2;
+                        }
+                    }
+                }
+            }
+        }
     }
 
     # now that we know what the business hours are for each day in a week,
@@ -321,24 +321,24 @@ sub for_timespan {
                 # We subtract 1 from the ending time, because the ending time
                 # really specifies what hour we end up closed at
                 $day_bizhours_end--;
-		
+                
                 push( @run_list, "$day_bizhours_start-$day_bizhours_end" );
-		
+                
             }
-	    
-	    if ($bizdays->{$dow}->{'Breaks'}) {
-		my $i = 0;
-		for ($i = 0; $i < @{$bizdays->{$dow}->{'Breaks'}}; $i++) {
-		    my $day_hours = $bizdays->{$dow}->{'Breaks'}[$i];
-		    if ( $day_hours->{'Start'} && $day_hours->{'End'} ) {
-			
-			# add the business seconds in that week to the runlist we'll use to
-			# figure out business hours
-			# (Be careful to use timelocal to convert times in the week into actual
-			# seconds, so we don't lose at DST transition)
-			my $day_bizhours_start = timelocal_nocheck(
-			    0,
-			    $day_hours->{'StartMinute'},
+            
+            if ($bizdays->{$dow}->{'Breaks'}) {
+                my $i = 0;
+                for ($i = 0; $i < @{$bizdays->{$dow}->{'Breaks'}}; $i++) {
+                    my $day_hours = $bizdays->{$dow}->{'Breaks'}[$i];
+                    if ( $day_hours->{'Start'} && $day_hours->{'End'} ) {
+                        
+                        # add the business seconds in that week to the runlist we'll use to
+                        # figure out business hours
+                        # (Be careful to use timelocal to convert times in the week into actual
+                        # seconds, so we don't lose at DST transition)
+                        my $day_bizhours_start = timelocal_nocheck(
+                            0,
+                            $day_hours->{'StartMinute'},
                             $day_hours->{'StartHour'},
                             ( $this_week_start[3] + $dow ),
                             $this_week_start[4],
@@ -355,10 +355,10 @@ sub for_timespan {
                         # really specifies what hour we end up closed at
                         $day_bizhours_end--;
 
-			push( @break_list, "$day_bizhours_start-$day_bizhours_end" );
-		    }
+                        push( @break_list, "$day_bizhours_start-$day_bizhours_end" );
+                    }
                 }
-	    }
+            }
         }
 
     # now that we're done with this week, calculate the start of the next week

commit 9531ab1f2d858f69b99c176cf29815c676c6ff82
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Nov 24 16:14:09 2011 +0400

    make code smaller

diff --git a/lib/Business/Hours.pm b/lib/Business/Hours.pm
index 07850d1..0070df6 100644
--- a/lib/Business/Hours.pm
+++ b/lib/Business/Hours.pm
@@ -216,39 +216,24 @@ sub for_timespan {
         End   => undef,
         @_
     );
-    my $bizdays;
-    if ( $self->{'business_hours'} ) {
-        $bizdays = $self->{'business_hours'};
-    } else {
-        $bizdays = $BUSINESS_HOURS;
-    }
+    my $bizdays = $self->{'business_hours'} || $BUSINESS_HOURS;
 
     # Split the Start and End times into hour/minute specifications
-    foreach my $day ( keys %$bizdays ) {
-        # Kept for (retro)compatibility
-        my $day_href = $bizdays->{$day};
+    foreach my $day ( values %$bizdays ) {
         foreach my $which (qw(Start End)) {
-            if (   $day_href->{$which}
-                && $day_href->{$which} =~ /^(\d+)\D(\d+)$/ )
-            {
-                $day_href->{ $which . 'Hour' }   = $1;
-                $day_href->{ $which . 'Minute' } = $2;
-            }
+            next unless $day->{ $which } && $day->{ $which } =~ /^(\d+)\D(\d+)$/;
+
+            $day->{ $which . 'Hour' }   = $1;
+            $day->{ $which . 'Minute' } = $2;
         }
         # Processing each period
-        if ($bizdays->{$day}->{'Breaks'}) {
-            my $i = 0;
-            for ($i = 0; $i < @{$bizdays->{$day}->{'Breaks'}}; $i++) {
-                if ($bizdays->{$day}->{'Breaks'}[$i]) {
-                    my $day_href = $bizdays->{$day}->{'Breaks'}[$i];
-                    foreach my $which (qw(Start End)) {
-                        if (   $day_href->{$which}
-                               && $day_href->{$which} =~ /^(\d+)\D(\d+)$/ )
-                        {
-                            $day_href->{ $which . 'Hour' }   = $1;
-                            $day_href->{ $which . 'Minute' } = $2;
-                        }
-                    }
+        if ( $day->{'Breaks'} ) {
+            foreach my $break ( grep $_, @{ $day->{'Breaks'} } ) {
+                foreach my $which (qw(Start End)) {
+                    next unless $break->{ $which } && $break->{ $which } =~ /^(\d+)\D(\d+)$/;
+
+                    $break->{ $which . 'Hour' }   = $1;
+                    $break->{ $which . 'Minute' } = $2;
                 }
             }
         }
@@ -304,60 +289,45 @@ sub for_timespan {
        # (Be careful to use timelocal to convert times in the week into actual
        # seconds, so we don't lose at DST transition)
                 my $day_bizhours_start = timelocal_nocheck(
-                    0,
-                    $day_hours->{'StartMinute'},
-                    $day_hours->{'StartHour'},
-                    ( $this_week_start[3] + $dow ),
-                    $this_week_start[4],
-                    $this_week_start[5]
+                    0, $day_hours->{'StartMinute'}, $day_hours->{'StartHour'},
+                    $this_week_start[3] + $dow, $this_week_start[4], $this_week_start[5]
                 );
 
                 my $day_bizhours_end = timelocal_nocheck(
-                    0, $day_hours->{'EndMinute'},
-                    $day_hours->{'EndHour'}, ( $this_week_start[3] + $dow ),
-                    $this_week_start[4], $this_week_start[5]
+                    0, $day_hours->{'EndMinute'}, $day_hours->{'EndHour'},
+                    $this_week_start[3] + $dow, $this_week_start[4], $this_week_start[5]
                 );
 
                 # We subtract 1 from the ending time, because the ending time
                 # really specifies what hour we end up closed at
                 $day_bizhours_end--;
-                
+
                 push( @run_list, "$day_bizhours_start-$day_bizhours_end" );
-                
             }
-            
-            if ($bizdays->{$dow}->{'Breaks'}) {
-                my $i = 0;
-                for ($i = 0; $i < @{$bizdays->{$dow}->{'Breaks'}}; $i++) {
-                    my $day_hours = $bizdays->{$dow}->{'Breaks'}[$i];
-                    if ( $day_hours->{'Start'} && $day_hours->{'End'} ) {
-                        
-                        # add the business seconds in that week to the runlist we'll use to
-                        # figure out business hours
-                        # (Be careful to use timelocal to convert times in the week into actual
-                        # seconds, so we don't lose at DST transition)
-                        my $day_bizhours_start = timelocal_nocheck(
-                            0,
-                            $day_hours->{'StartMinute'},
-                            $day_hours->{'StartHour'},
-                            ( $this_week_start[3] + $dow ),
-                            $this_week_start[4],
-                            $this_week_start[5]
-                        );
-
-                        my $day_bizhours_end = timelocal_nocheck(
-                            0, $day_hours->{'EndMinute'},
-                            $day_hours->{'EndHour'}, ( $this_week_start[3] + $dow ),
-                            $this_week_start[4], $this_week_start[5]
-                        );
-
-                        # We subtract 1 from the ending time, because the ending time
-                        # really specifies what hour we end up closed at
-                        $day_bizhours_end--;
-
-                        push( @break_list, "$day_bizhours_start-$day_bizhours_end" );
-                    }
-                }
+
+            foreach my $day_hours ( @{ $bizdays->{$dow}{'Breaks'} || [] } ) {
+                next unless $day_hours->{'Start'} && $day_hours->{'End'};
+
+                # add the business seconds in that week to the runlist we'll use to
+                # figure out business hours
+                # (Be careful to use timelocal to convert times in the week into actual
+                # seconds, so we don't lose at DST transition)
+                my $day_bizhours_start = timelocal_nocheck(
+                    0, $day_hours->{'StartMinute'}, $day_hours->{'StartHour'},
+                    $this_week_start[3] + $dow, $this_week_start[4], $this_week_start[5]
+                );
+
+                my $day_bizhours_end = timelocal_nocheck(
+                    0, $day_hours->{'EndMinute'}, $day_hours->{'EndHour'}, 
+                    $this_week_start[3] + $dow, $this_week_start[4], $this_week_start[5]
+                );
+
+                # We subtract 1 from the ending time, because the ending time
+                # really specifies what hour we end up closed at
+                $day_bizhours_end--;
+
+                push( @break_list, "$day_bizhours_start-$day_bizhours_end" );
+
             }
         }
 

commit 164c7e1c3f0ea53ce4b3df9f41e1554fd6b3ec71
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Nov 24 16:27:37 2011 +0400

    use today pointer, instead of week start
    
    we always need today, no point in adding $dow
    all the time

diff --git a/lib/Business/Hours.pm b/lib/Business/Hours.pm
index 0070df6..b8d6930 100644
--- a/lib/Business/Hours.pm
+++ b/lib/Business/Hours.pm
@@ -275,11 +275,13 @@ sub for_timespan {
 
     while ( $week_start <= $args{'End'} ) {
 
-        my @this_week_start = localtime($week_start);
+        my @today = (localtime($week_start))[3, 4, 5];
+        $today[0]--; # compensate next increment
 
         # foreach day in the week, find that day's business hours in
         # seconds since the epoch.
         for ( my $dow = 0; $dow <= 6; $dow++ ) {
+            $today[0]++; # next day comes
 
             my $day_hours = $bizdays->{$dow};
             if ( $day_hours->{'Start'} && $day_hours->{'End'} ) {
@@ -289,13 +291,11 @@ sub for_timespan {
        # (Be careful to use timelocal to convert times in the week into actual
        # seconds, so we don't lose at DST transition)
                 my $day_bizhours_start = timelocal_nocheck(
-                    0, $day_hours->{'StartMinute'}, $day_hours->{'StartHour'},
-                    $this_week_start[3] + $dow, $this_week_start[4], $this_week_start[5]
+                    0, $day_hours->{'StartMinute'}, $day_hours->{'StartHour'}, @today
                 );
 
                 my $day_bizhours_end = timelocal_nocheck(
-                    0, $day_hours->{'EndMinute'}, $day_hours->{'EndHour'},
-                    $this_week_start[3] + $dow, $this_week_start[4], $this_week_start[5]
+                    0, $day_hours->{'EndMinute'}, $day_hours->{'EndHour'}, @today
                 );
 
                 # We subtract 1 from the ending time, because the ending time
@@ -313,13 +313,11 @@ sub for_timespan {
                 # (Be careful to use timelocal to convert times in the week into actual
                 # seconds, so we don't lose at DST transition)
                 my $day_bizhours_start = timelocal_nocheck(
-                    0, $day_hours->{'StartMinute'}, $day_hours->{'StartHour'},
-                    $this_week_start[3] + $dow, $this_week_start[4], $this_week_start[5]
+                    0, $day_hours->{'StartMinute'}, $day_hours->{'StartHour'}, @today
                 );
 
                 my $day_bizhours_end = timelocal_nocheck(
-                    0, $day_hours->{'EndMinute'}, $day_hours->{'EndHour'}, 
-                    $this_week_start[3] + $dow, $this_week_start[4], $this_week_start[5]
+                    0, $day_hours->{'EndMinute'}, $day_hours->{'EndHour'}, @today
                 );
 
                 # We subtract 1 from the ending time, because the ending time
@@ -334,8 +332,7 @@ sub for_timespan {
     # now that we're done with this week, calculate the start of the next week
     # the next week starts at midnight on the sunday following the previous
     # sunday
-        $week_start = timelocal_nocheck( 0, 0, 0, ( $this_week_start[3] + 7 ),
-            $this_week_start[4], $this_week_start[5] );
+        $week_start = timelocal_nocheck( 0, 0, 0, $today[0]+1, $today[1], $today[2] );
 
     }
 

commit b975d72815f156114bf0a872f16f6b3cf23f881c
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Nov 24 22:29:17 2011 +0400

    process and prepare primary structure earlier

diff --git a/lib/Business/Hours.pm b/lib/Business/Hours.pm
index b8d6930..eadb7eb 100644
--- a/lib/Business/Hours.pm
+++ b/lib/Business/Hours.pm
@@ -71,6 +71,7 @@ our $BUSINESS_HOURS = (
         }
     }
 );
+__PACKAGE__->preprocess_business_hours( $BUSINESS_HOURS );
 
 =head2 new
 
@@ -163,10 +164,50 @@ sub business_hours {
     if ( @_ ) {
         %{ $self->{'business_hours'} } = (@_);
         $self->{'holidays'} = delete $self->{'business_hours'}{'holidays'};
+        $self->preprocess_business_hours( $self->{'business_hours'} );
     }
     return %{ $self->{'business_hours'} };
 }
 
+=head2 preprocess_business_hours
+
+Checks and transforms business hours data. No need to call it.
+
+=cut
+
+sub preprocess_business_hours {
+    my $self = shift;
+    my $bizdays = shift;
+
+    my $process_start_end = sub {
+        my $span = shift;
+        foreach my $which (qw(Start End)) {
+            return 0 unless $span->{ $which } && $span->{ $which } =~ /^(\d+)\D(\d+)$/;
+
+            $span->{ $which . 'Hour' }   = $1;
+            $span->{ $which . 'Minute' } = $2;
+        }
+        return 1;
+    };
+
+    # Split the Start and End times into hour/minute specifications
+    foreach my $dow ( keys %$bizdays ) {
+        unless (
+            $bizdays->{ $dow } && ref($bizdays->{ $dow }) eq 'HASH'
+            && $process_start_end->( $bizdays->{ $dow } )
+        ) {
+            delete $bizdays->{ $dow };
+            next;
+        }
+
+        foreach my $break ( splice @{ $bizdays->{ $dow }{'Breaks'} || [] } ) {
+            next unless $break && ref($break) eq 'HASH';
+            push @{ $bizdays->{ $dow }{'Breaks'} }, $break
+                if $process_start_end->( $break );
+        }
+    }
+}
+
 =head2 holidays ARRAY
 
 Gets / sets holidays for this object. Takes an array
@@ -218,27 +259,6 @@ sub for_timespan {
     );
     my $bizdays = $self->{'business_hours'} || $BUSINESS_HOURS;
 
-    # Split the Start and End times into hour/minute specifications
-    foreach my $day ( values %$bizdays ) {
-        foreach my $which (qw(Start End)) {
-            next unless $day->{ $which } && $day->{ $which } =~ /^(\d+)\D(\d+)$/;
-
-            $day->{ $which . 'Hour' }   = $1;
-            $day->{ $which . 'Minute' } = $2;
-        }
-        # Processing each period
-        if ( $day->{'Breaks'} ) {
-            foreach my $break ( grep $_, @{ $day->{'Breaks'} } ) {
-                foreach my $which (qw(Start End)) {
-                    next unless $break->{ $which } && $break->{ $which } =~ /^(\d+)\D(\d+)$/;
-
-                    $break->{ $which . 'Hour' }   = $1;
-                    $break->{ $which . 'Minute' } = $2;
-                }
-            }
-        }
-    }
-
     # now that we know what the business hours are for each day in a week,
     # we need to find all the business hours in the period in question.
 

commit e33eeaabfb5f849b1f006dab873ecba151a2d4f2
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Nov 24 22:31:05 2011 +0400

    extract repeated code into anon sub

diff --git a/lib/Business/Hours.pm b/lib/Business/Hours.pm
index eadb7eb..fd8c2ea 100644
--- a/lib/Business/Hours.pm
+++ b/lib/Business/Hours.pm
@@ -293,6 +293,26 @@ sub for_timespan {
     # (This is fed into Set::IntSpan to use to compute our actual run.
     my @break_list;
 
+    my $convert_start_end = sub {
+        my ($hours, @today) = @_;
+
+        # add the business seconds in that week to the runlist we'll use to
+        # figure out business hours
+        # (Be careful to use timelocal to convert times in the week into actual
+        # seconds, so we don't lose at DST transition)
+        my $start = timelocal_nocheck(
+            0, $hours->{'StartMinute'}, $hours->{'StartHour'}, @today
+        );
+
+        # We subtract 1 from the ending time, because the ending time
+        # really specifies what hour we end up closed at
+        my $end = timelocal_nocheck(
+            0, $hours->{'EndMinute'}, $hours->{'EndHour'}, @today
+        ) - 1;
+
+        return "$start-$end";
+    };
+
     while ( $week_start <= $args{'End'} ) {
 
         my @today = (localtime($week_start))[3, 4, 5];
@@ -302,50 +322,12 @@ sub for_timespan {
         # seconds since the epoch.
         for ( my $dow = 0; $dow <= 6; $dow++ ) {
             $today[0]++; # next day comes
+            next unless my $day_hours = $bizdays->{$dow};
 
-            my $day_hours = $bizdays->{$dow};
-            if ( $day_hours->{'Start'} && $day_hours->{'End'} ) {
-
-       # add the business seconds in that week to the runlist we'll use to
-       # figure out business hours
-       # (Be careful to use timelocal to convert times in the week into actual
-       # seconds, so we don't lose at DST transition)
-                my $day_bizhours_start = timelocal_nocheck(
-                    0, $day_hours->{'StartMinute'}, $day_hours->{'StartHour'}, @today
-                );
-
-                my $day_bizhours_end = timelocal_nocheck(
-                    0, $day_hours->{'EndMinute'}, $day_hours->{'EndHour'}, @today
-                );
-
-                # We subtract 1 from the ending time, because the ending time
-                # really specifies what hour we end up closed at
-                $day_bizhours_end--;
-
-                push( @run_list, "$day_bizhours_start-$day_bizhours_end" );
-            }
-
-            foreach my $day_hours ( @{ $bizdays->{$dow}{'Breaks'} || [] } ) {
-                next unless $day_hours->{'Start'} && $day_hours->{'End'};
-
-                # add the business seconds in that week to the runlist we'll use to
-                # figure out business hours
-                # (Be careful to use timelocal to convert times in the week into actual
-                # seconds, so we don't lose at DST transition)
-                my $day_bizhours_start = timelocal_nocheck(
-                    0, $day_hours->{'StartMinute'}, $day_hours->{'StartHour'}, @today
-                );
-
-                my $day_bizhours_end = timelocal_nocheck(
-                    0, $day_hours->{'EndMinute'}, $day_hours->{'EndHour'}, @today
-                );
-
-                # We subtract 1 from the ending time, because the ending time
-                # really specifies what hour we end up closed at
-                $day_bizhours_end--;
-
-                push( @break_list, "$day_bizhours_start-$day_bizhours_end" );
+            push @run_list, $convert_start_end->( $day_hours, @today );
 
+            foreach my $break ( @{ $bizdays->{$dow}{'Breaks'} || [] } ) {
+                push @break_list, $convert_start_end->( $break, @today );
             }
         }
 

commit c28dc6d6d355b920afcc330049ecf06f2bb2745f
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Nov 24 22:32:22 2011 +0400

    if end <= start then it's shift over midnight
    
    starts today and ends on the next day

diff --git a/Changes b/Changes
index 9cd8735..9c8d193 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,9 @@
 Revision history for Perl module Business::Hours
 
+0.10_01
+  * support shifts over midnight, for example:
+  { Start => '18:00', End => '02:00' }
+
 0.10
   * perl 5.14 compatibility
 
diff --git a/lib/Business/Hours.pm b/lib/Business/Hours.pm
index fd8c2ea..c37f7b9 100644
--- a/lib/Business/Hours.pm
+++ b/lib/Business/Hours.pm
@@ -187,6 +187,9 @@ sub preprocess_business_hours {
             $span->{ $which . 'Hour' }   = $1;
             $span->{ $which . 'Minute' } = $2;
         }
+        $span->{'EndHour'} += 24
+            if $span->{'EndHour'}*60+$span->{'EndMinute'}
+            <= $span->{'StartHour'}*60+$span->{'StartMinute'};
         return 1;
     };
 

commit 89c9ceb956194f98717c36e4544aec409a4c0610
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Nov 24 22:59:46 2011 +0400

    put Time::Local into required modules

diff --git a/Makefile.PL b/Makefile.PL
index dc94c22..b85326d 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -5,7 +5,7 @@ WriteMakefile(
     NAME         => 'Business::Hours',
     VERSION_FROM => 'lib/Business/Hours.pm', # finds $VERSION
     AUTHOR       => 'Jesse Vincent (jesse at cpan.org)',
-    PREREQ_PM	=> { Set::IntSpan => '1.12'},
+    PREREQ_PM	 => { Set::IntSpan => '1.12', 'Time::Local' => '0'},
     ABSTRACT     => '',
     (MM->can('signature_target') ? (SIGN => 1) : ()),
 );

commit 3f7902bf988dced4767f1ebe8528d66b505d3bd0
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Apr 19 13:58:20 2012 +0400

    bump version, 0.10_01
    
    it was released ong time ago

diff --git a/META.yml b/META.yml
index 598505d..0d0ecc0 100644
--- a/META.yml
+++ b/META.yml
@@ -7,7 +7,7 @@ build_requires:
 configure_requires:
   ExtUtils::MakeMaker: 0
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.58, CPAN::Meta::Converter version 2.112150'
+generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.112621'
 license: unknown
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -19,4 +19,5 @@ no_index:
     - inc
 requires:
   Set::IntSpan: 1.12
-version: 0.10
+  Time::Local: 0
+version: 0.10_01
diff --git a/lib/Business/Hours.pm b/lib/Business/Hours.pm
index c37f7b9..58d5fc0 100644
--- a/lib/Business/Hours.pm
+++ b/lib/Business/Hours.pm
@@ -7,7 +7,7 @@ require 5.006;
 use Set::IntSpan;
 use Time::Local qw/timelocal_nocheck/;
 
-our $VERSION = '0.10';
+our $VERSION = '0.10_01';
 
 =head1 NAME
 

commit 85ec07876b0262e482329fb0747ddcf3ec23bdb0
Merge: 336afdb 3f7902b
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Aug 22 18:20:42 2013 +0400

    Merge tag '0.10_01'
    
    release 0.10_01
    
    Conflicts:
    	Changes
    	META.yml
    	lib/Business/Hours.pm

diff --cc Changes
index 2ad28dc,9c8d193..6c37832
--- a/Changes
+++ b/Changes
@@@ -1,8 -1,9 +1,12 @@@
  Revision history for Perl module Business::Hours
  
 +0.11
 +  * POD fixes
 +
+ 0.10_01
+   * support shifts over midnight, for example:
+   { Start => '18:00', End => '02:00' }
+ 
  0.10
    * perl 5.14 compatibility
  
diff --cc META.yml
index db80c68,0d0ecc0..d407e71
--- a/META.yml
+++ b/META.yml
@@@ -19,4 -19,5 +19,5 @@@ no_index
      - inc
  requires:
    Set::IntSpan: 1.12
+   Time::Local: 0
 -version: 0.10_01
 +version: 0.11

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list