# Copyright (c) 2002 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: Month.pm,v 2.3 2008/10/15 21:44:23 moeller Exp $ package Bivio::Type::Month; use strict; use Bivio::Base 'Type.Enum'; our($VERSION) = sprintf('%d.%02d', q$Revision: 2.3 $ =~ /\d+/g); __PACKAGE__->compile([ JANUARY => [1, 'Jan', 'January', '01'], FEBRUARY => [2, 'Feb', 'February', '02'], MARCH => [3, 'Mar', 'March', '03'], APRIL => [4, 'Apr', 'April', '04'], MAY => [5, 'May', 'May', '05'], JUNE => [6, 'Jun', 'June', '06'], JULY => [7, 'Jul', 'July', '07'], AUGUST => [8, 'Aug', 'August', '08'], SEPTEMBER => [9, 'Sep', 'September', '09'], OCTOBER => [10, 'Oct', 'October'], NOVEMBER => [11, 'Nov', 'November'], DECEMBER => [12, 'Dec', 'December'], ]); sub get_two_digit_value { my($self) = @_; return sprintf("%.2d", $self->as_int); } 1;