lib/Spreadsheet/Engine/Function/TODAY.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 15 | 15 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 6 | 6 | 100.0 |
pod | 1 | 1 | 100.0 |
total | 22 | 22 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Spreadsheet::Engine::Function::TODAY; | ||||||
2 | |||||||
3 | 28 | 28 | 339 | use strict; | |||
28 | 59 | ||||||
28 | 865 | ||||||
4 | 28 | 28 | 147 | use warnings; | |||
28 | 60 | ||||||
28 | 709 | ||||||
5 | |||||||
6 | 28 | 28 | 149 | use base 'Spreadsheet::Engine::Function::NOW'; | |||
28 | 54 | ||||||
28 | 6741 | ||||||
7 | 28 | 28 | 4644 | use Time::Local; | |||
28 | 66 | ||||||
28 | 5329 | ||||||
8 | |||||||
9 | 152 | 152 | 1 | 4172 | sub result_type { 'ndt' } | ||
10 | |||||||
11 | sub _start_time { | ||||||
12 | 152 | 152 | 251 | my ($self, $time) = @_; | |||
13 | 152 | 7235 | return timegm(0, 0, 0, (localtime($time))[ 3 .. 5 ]); | ||||
14 | } | ||||||
15 | |||||||
16 | 1; | ||||||
17 | |||||||
18 | __END__ |