# Copyright (c) 2001 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: CreditCardExpiration.pm,v 2.2 2006/10/16 21:08:04 moeller Exp $ package Bivio::PetShop::Widget::CreditCardExpiration; use strict; $Bivio::PetShop::Widget::CreditCardExpiration::VERSION = sprintf('%d.%02d', q$Revision: 2.2 $ =~ /\d+/g); $_ = $Bivio::PetShop::Widget::CreditCardExpiration::VERSION; =head1 NAME Bivio::PetShop::Widget::CreditCardExpiration - credit card expiration date widget =head1 RELEASE SCOPE bOP =head1 SYNOPSIS use Bivio::PetShop::Widget::CreditCardExpiration; =cut =head1 EXTENDS L =cut use Bivio::UI::Widget; @Bivio::PetShop::Widget::CreditCardExpiration::ISA = ('Bivio::UI::Widget'); =head1 DESCRIPTION C implements a credit card expiration date selection widget. =cut #=IMPORTS use Bivio::Type::Date; use Bivio::Type::Month; #=VARIABLES =head1 METHODS =cut =for html =head2 initialize() Performs any startup initialization. =cut sub initialize { my($self) = @_; return; } =for html =head2 render(any source, string_ref buffer) Draws the expiration date onto the buffer. =cut sub render { my($self, $source, $buffer) = @_; my($date) = $source->get_widget_value($self->get('value')); $$buffer .= Bivio::Type::Month->from_int( Bivio::Type::Date->get_part($date, 'month'))->get_short_desc . ' ' . Bivio::Type::Date->get_part($date, 'year'); return; } #=PRIVATE METHODS =head1 COPYRIGHT Copyright (c) 2001 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 =head1 VERSION $Id: CreditCardExpiration.pm,v 2.2 2006/10/16 21:08:04 moeller Exp $ =cut 1;