Commit | Line | Data |
7adfd53f |
1 | package Reaction::Types::DateTime; |
2 | |
3 | use Moose::Util::TypeConstraints; |
4 | |
5 | use DateTime; |
6 | |
7 | subtype 'DateTime' |
8 | => as 'Object' |
9 | => where { $_->isa('DateTime') } |
10 | => message { "Must be of the form YYYY-MM-DD HH:MM:SS" }; |
11 | |
12 | use DateTime::SpanSet; |
13 | |
14 | subtype 'DateTime::SpanSet' |
15 | => as 'Object' |
16 | => where { $_->isa('DateTime::SpanSet') }; |
17 | |
18 | subtype 'TimeRangeCollection' |
19 | => as 'ArrayRef'; |
20 | |
21 | 1; |
22 | |
23 | =head1 NAME |
24 | |
25 | Reaction::Types::DateTime |
26 | |
27 | =head1 DESCRIPTION |
28 | |
29 | =over |
30 | |
31 | =item * DateTime |
32 | |
33 | =item * DateTime::SpanSet |
34 | |
35 | =item * TimeRangeCollection |
36 | |
37 | =back |
38 | |
39 | =head1 SEE ALSO |
40 | |
41 | =over |
42 | |
43 | =item * L<Reaction::Types::Core> |
44 | |
45 | =back |
46 | |
47 | =head1 AUTHORS |
48 | |
49 | See L<Reaction::Class> for authors. |
50 | |
51 | =head1 LICENSE |
52 | |
53 | See L<Reaction::Class> for the license. |
54 | |
55 | =cut |