line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DBIx::Class::Helper::Schema::DateTime; |
2
|
|
|
|
|
|
|
$DBIx::Class::Helper::Schema::DateTime::VERSION = '2.036000'; |
3
|
|
|
|
|
|
|
# ABSTRACT: DateTime helper |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
773
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
6
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
6
|
use parent 'DBIx::Class::Schema'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
9
|
|
|
|
|
|
|
|
10
|
5
|
|
|
5
|
0
|
86956
|
sub datetime_parser { return shift->storage->datetime_parser } |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
0
|
106
|
sub parse_datetime { return shift->datetime_parser->parse_datetime(@_) } |
13
|
|
|
|
|
|
|
|
14
|
3
|
|
|
3
|
0
|
63228
|
sub format_datetime { return shift->datetime_parser->format_datetime(@_) } |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
1; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
__END__ |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=pod |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 NAME |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
DBIx::Class::Helper::Schema::DateTime - DateTime helper |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 SYNOPSIS |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
package MyApp::Schema; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__PACKAGE__->load_components('Helper::Schema::DateTime'); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
... |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
$schema->resultset('Book')->search({ |
35
|
|
|
|
|
|
|
written_on => $schema->format_datetime(DateTime->now) |
36
|
|
|
|
|
|
|
}); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 AUTHOR |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com> |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
This software is copyright (c) 2020 by Arthur Axel "fREW" Schmidt. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
47
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=cut |