DateStamp

 view release on metacpan or  search on metacpan

lib/DateStamp.pm  view on Meta::CPAN

 $date_obj->return_day(format=>'alpha', length=>'long');   # Sunday
 $date_obj->return_day(format=>'numeric');                 # 27

=head2 return_time

return_time: This method will return a variety of time formats. The time in this sense is literally a "timestamp", in that it captures the time at the moment the date object is created--and *not* when the method is called.

 $date_obj->return_time(format=>'12', length=>'short');  # 12:56 a.m.
 $date_obj->return_time(format=>'12', length=>'long' );  # 12:56:32 a.m.
 $date_obj->return_time(format=>'24', length=>'short');  # 00:56
 $date_obj->return_time(format=>'24', length=>'long' );  # 00:56:32
 $date_obj->return_time(format=>'localtime'          );  # Sun Nov 27 00:13:56 2005 

=head2 return_date

return_date: This method provides serveral frequently used, pre-compiled date combinations. The combinations are not meant to be exhaustive, as other combinations can be arrived at by combining the aforementioned month/day/year/timestamp methods. Bot...

 $date_obj->return_date(format=>'yyyymmdd');                # 20051127 
 $date_obj->return_date(format=>'yyyymmdd', glue=>'-');     # 2005-11-27 
 $date_obj->return_date(format=>'mmddyyyy');                # 11272005
 $date_obj->return_date(format=>'mmddyyyy', glue=>'/');     # 11/27/2005
 $date_obj->return_date(format=>'month-day-year');          # November 27, 2005
 $date_obj->return_date(format=>'mon-day-year');            # Nov 27, 2005 
 $date_obj->return_date(format=>'weekday-month-day-year');  # Monday, November 27, 2005
 $date_obj->return_date(format=>'month-day');               # November 27
 $date_obj->return_date(format=>'mon-day');                 # Nov 27


=head1 DIAGNOSTICS

A user may encounter error messages associated with this module if required method arguments are malformed or missing.

=over

=item C<< DateStamp reports: Bad/missing "format" argument. >>

[A user has invoked a method that requires a "format" argument of type valid for the method called. Check spelling, case (lower-case required), and argument types associated with the method in question.]

=item C<< DateStamp reports: Bad/missing "length" argument. >>

[A user has invoked a method that requires a "length" argument of type valid for the method called. Check spelling, case (lower-case required), and argument types associated with the method in question.]

=back


=head1 CONFIGURATION AND ENVIRONMENT

DateStamp requires no configuration files or environment variables.


=head1 DEPENDENCIES

This module calls a few others: strict; warnings; Carp; version.


=head1 INCOMPATIBILITIES

None reported.


=head1 BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests to
C<bug-date-current@rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org>.


=head1 SEE ALSO

There are several heavy-weight date/time modules in CPAN. Try a search for DateTime or Date in CPAN for a list of alternatives.


=head1 ACKNOWLEDGMENTS

Yup, this is my first CPAN module; I wanted to contribute something very simple to start with. Thanks to Andy Lester for his presentation I<"The A-Z Guide To Becoming a CPAN Author"> at the St. Louis Perl Monger chapter meeting in November, 2005. His...


=head1 AUTHOR

Todd Wylie  

C<< <perldev@monkeybytes.org> >>  

L<< http://www.monkeybytes.org >>


=head1 LICENSE AND COPYRIGHT

Copyright (c) 2005, Todd Wylie C<< <perldev@monkeybytes.org> >>. All rights reserved.

This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself. See perlartistic.


=head1 DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

=head1 NOTE



( run in 1.959 second using v1.01-cache-2.11-cpan-39bf76dae61 )