File Coverage

blib/lib/oEdtk/DateField.pm
Criterion Covered Total %
statement 9 12 75.0
branch n/a
condition n/a
subroutine 3 4 75.0
pod 0 1 0.0
total 12 17 70.5


line stmt bran cond sub pod time code
1             package oEdtk::DateField;
2            
3 1     1   639 use strict;
  1         2  
  1         38  
4 1     1   6 use warnings;
  1         2  
  1         28  
5            
6 1     1   6 use base 'oEdtk::Field';
  1         1  
  1         203  
7             our $VERSION = 0.14;
8            
9             sub process {
10 0     0 0   my ($self, $data) = @_;
11            
12 0           $data =~ s/^(\d{4})(\d{2})(\d{2}).*$/$3\/$2\/$1/;
13 0           return $data;
14             }
15            
16             1;