Merge 'trunk' into 'sybase'
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / Sybase / DateTime.pm
1 package # hide from PAUSE
2     DBIx::Class::Storage::DBI::Sybase::DateTime;
3
4 use strict;
5 use warnings;
6 use DateTime::Format::Strptime;
7
8 my $inflate_format = DateTime::Format::Strptime->new(
9   pattern => '%Y-%m-%dT%H:%M:%S.%3NZ'
10 );
11
12 my $deflate_format = DateTime::Format::Strptime->new(
13   pattern => '%m/%d/%Y %H:%M:%S.%3N'
14 );
15
16 sub parse_datetime  { shift; $inflate_format->parse_datetime(@_) }
17
18 sub format_datetime { shift; $deflate_format->format_datetime(@_) }
19
20 1;
21
22 =head1 NAME
23
24 DBIx::Class::Storage::DBI::Sybase::DateTime - DateTime inflation/deflation
25 support for Sybase in L<DBIx::Class>.
26
27 =head1 DESCRIPTION
28
29 This needs to become L<DateTime::Format::Sybase>.
30
31 =head1 AUTHORS
32
33 See L<DBIx::Class/CONTRIBUTORS>.
34
35 =head1 LICENSE
36
37 You may distribute this code under the same terms as Perl itself.
38
39 =cut
40 # vim:sts=2 sw=2: