-
-
03 Sep 2005 21:33:44 UTC
- Distribution: Time-Piece-Month
- Module version: 1.00
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues
- Testers (909 / 0 / 1)
- Kwalitee
Bus factor: 0- 100.00% Coverage
- License: unknown
- Activity
24 month- Tools
- Download (2.88KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Time::Piece::Range
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Time::Piece::Month - a month of Time::Piece objects
SYNOPSIS
use Time::Piece::Month; my $month = Time::Piece::Month->new(Time::Piece $tp); my $month = Time::Piece::Month->new("2002-01-03"); my Time::Piece::Month $prev = $month->prev_month; my Time::Piece::Month $next = $month->next_month; my @dates = $month->dates; my @dates = $month->wraparound_dates;
DESCRIPTION
This is an extension to Time::Piece::Range that represents a complete calendar month.
CONSTRUCTOR
new
my $month = Time::Piece::Month->new(Time::Piece $tp); my $month = Time::Piece::Month->new("2002-01-03");
A Month object can be instantiated from either a Time::Piece object, or a Y-m-d format string.
METHODS
As well as the inherited Time::Piece::Range methods, we also include:
prev_month / next_month
my Time::Piece::Month $prev = $month->prev_month; my Time::Piece::Month $next = $month->next_month;
The next and previous months.
wraparound_dates
This returns a list of Time::Piece objects representing each day in the month, but also including the days on either side that ensure that the full list runs from a Sunday to a Saturday. This is useful for displaying calendars.
AUTHOR
Tony Bowden
BUGS and QUERIES
Please direct all correspondence regarding this module to: bug-Business-Barcode-EAN13@rt.cpan.org
COPYRIGHT AND LICENSE
Copyright (C) 2002-2005 Kasei This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License; either version 2 of the License, or (at your option) any later version. This program 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.
Module Install Instructions
To install Time::Piece::Month, copy and paste the appropriate command in to your terminal.
cpanm Time::Piece::Month
perl -MCPAN -e shell install Time::Piece::Month
For more information on module installation, please visit the detailed CPAN module installation guide.