line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package SQL::Statement::Function::ByName::DAYOFYEAR; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
2837
|
use 5.010001; |
|
1
|
|
|
|
|
4
|
|
4
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
31
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
432
|
use Date::Calc qw(Day_of_Year); |
|
1
|
|
|
|
|
6281
|
|
|
1
|
|
|
|
|
192
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY |
10
|
|
|
|
|
|
|
our $DATE = '2022-12-12'; # DATE |
11
|
|
|
|
|
|
|
our $DIST = 'SQL-Statement-Functions-Date'; # DIST |
12
|
|
|
|
|
|
|
our $VERSION = '0.050'; # VERSION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub SQL_FUNCTION_DAYOFYEAR { |
15
|
4
|
|
|
4
|
0
|
22
|
my $param = $_[2]; |
16
|
4
|
100
|
|
|
|
25
|
$param =~ /\A(\d{4})-(\d{2})-(\d{2})/ or return undef; ## no critic: TestingAndDebugging::ProhibitExplicitReturnUndef |
17
|
3
|
|
|
|
|
24
|
Day_of_Year($1, $2, $3); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |
21
|
|
|
|
|
|
|
# ABSTRACT: Return day of year of a date/datetime expression |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
__END__ |