App::datetime

App::datetime is a date and time considerations.
Download

App::datetime Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • App::datetime Team
  • Publisher web site:
  • http://search.cpan.org/~spadkins/App-Context-0.964/lib/App/datetime.pod

App::datetime Tags


App::datetime Description

App::datetime is a date and time considerations. App::datetime is a date and time considerations.Most Enterprise development includes processing of dates and times. There are many date and time modules on CPAN, and choosing the right one can be confusing. There are no special perl data types for dates and times, so some direction is needed.The short answer is that we recommend the following for most common date and time operations. Class::Date Class::Date::RelHowever, other modules are appropriate in certain circumstances. So for the longer answer, read on.PERL 5 LANGUAGE SUPPORTThe native Perl 5 datetime type is an integer. It is not different from other integers in any way other than how it is used. It represents the number of non-leap seconds since January 1, 1970 UTC (the "Epoch" at GMT). The following internal Perl function gets the current time. $current_time = time; $current_time = time();Other Perl functions that return this "datetime" integer are ($dev, $ino, $mode, $nlink, $uid, $gid, $redev, $size, $atime, $mtime, $ctime, $blksize, $blocks) = stat($filename); ($dev, $ino, $mode, $nlink, $uid, $gid, $redev, $size, $atime, $mtime, $ctime, $blksize, $blocks) = lstat($filename);where $atime, $mtime, and $ctime are the same kind of integers, representing the access time, modification time, and change time of a file.These $time values may be converted to human-readable form using the following internal perl functions. (See the "perlfunc" man page for more information.) ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($time); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($time);Furthermore, the current time zone needs to be accessed through the environment variable, "TZ". $timezone = $ENV{TZ};This leaves the Perl developer with lots of work to do in order to process dates.Formatting dates for outputParsing dates on inputComparing datesDate math (addition, subtraction)Other calendar-specific functions (i.e. holidays, days of week, etc)Numerous modules have been posted to CPAN allowing the Perl developer to accomplish these tasks. However, they have pros and cons related to the following features.InternationalizationSpeedPortabilityRanges of Dates SupportedCompliance with Perl Styleguide (function naming) Requirements: · Perl


App::datetime Related Software