# Copyright (c) 2000 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: ECCreditCardExpYear.pm,v 2.4 2008/10/15 22:39:46 moeller Exp $ package Bivio::Type::ECCreditCardExpYear; use strict; use Bivio::Base 'Type.Enum'; our($VERSION) = sprintf('%d.%02d', q$Revision: 2.4 $ =~ /\d+/g); #TODO: remove this class - use YearWindow instead my($_D) = __PACKAGE__->use('Type.Date'); my($_NOW) = $_D->get_part($_D->now, 'year'); # 10 year window from current year forward, ex. (Y2004 => [2004, 2004]) __PACKAGE__->compile([ map({ ("Y$_" => [$_, $_]), } ($_NOW .. $_NOW + 9)), ]); 1;