# Copyright (c) 2010 bivio Software, Inc. All Rights Reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: DateTime2.bunit,v 1.3 2010/02/06 19:39:26 nagler Exp $ [ { object => class(), compute_params => sub { my($case, $params) = @_; return [DateTime($params->[0])]; }, compute_return => sub { my($case, $actual) = @_; return [DateTime()->to_string($actual->[0])]; }, } => [ set_end_of_month => [ '12/1/2000 0:0:0' => '12/31/2000 00:00:00 GMT', '2/1/2000 0:0:0' => '02/29/2000 00:00:00 GMT', '2/26/1900 0:0:0' => '02/28/1900 00:00:00 GMT', '2/26/1980 0:32:0' => '02/29/1980 00:32:00 GMT', ], set_beginning_of_month => [ '12/1/2000 0:0:0' => '12/01/2000 00:00:00 GMT', '2/3/2000 0:0:0' => '02/01/2000 00:00:00 GMT', '2/26/1980 0:32:0' => '02/01/1980 00:32:00 GMT', ], set_end_of_day => [ '12/1/2000 0:0:0' => '12/01/2000 23:59:59 GMT', ], set_beginning_of_day => [ '12/1/2000 1:2:3' => '12/01/2000 00:00:00 GMT', ], set_end_of_week => [ '12/5/2009 1:2:3' => '12/05/2009 01:02:03 GMT', '12/4/2009 1:2:3' => '12/05/2009 01:02:03 GMT', '11/29/2009 0:0:0' => '12/05/2009 00:00:00 GMT', ], set_beginning_of_week => [ '12/5/2009 1:2:3' => '11/29/2009 01:02:03 GMT', '12/4/2009 1:2:3' => '11/29/2009 01:02:03 GMT', '11/29/2009 0:0:0' => '11/29/2009 00:00:00 GMT', ], ], ];