Help for this page

Select Code to Download


  1. or download this
    use constant WEEKDAY => 1;
    use constant WEEKEND => 0;
    ...
      my $dow = (localtime ($date || time))[6];
      return substr $self->{weekdays}, $dow, 1 ? WEEKDAY : WEEKEND;
    }
    
  2. or download this
    my %params = (
    ...
    ...
       'Sunday is weekend');
    is($obj->is_weekday(UnixDate(ParseDate('last tuesday'), "%s")), 1,
       'Tuesday is weekday');
    
  3. or download this
    root@system:/some/path# prove account_type.t
    account_type....NOK 27
    ...
    # in account_type.t at line 71.
    # got: '0'
    # expected: '1'