*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> perl5/Time::localtime (3)              
Title
Content
Arch
Section
 

Contents


Time::localtime(3)					    Time::localtime(3)


NAME    [Toc]    [Back]

     Time::localtime - by-name interface to Perl's built-in localtime()
     function

SYNOPSIS    [Toc]    [Back]

      use Time::localtime;
      printf "Year is %d\n", localtime->year() + 1900;

      $now = ctime();

      use Time::localtime;
      use File::stat;
      $date_string = ctime(stat($file)->mtime);

DESCRIPTION    [Toc]    [Back]

     This module's default exports override the	core localtime() function,
     replacing it with a version that returns "Time::tm" objects.  This	object
     has methods that return the similarly named structure field name from the
     C's tm structure from time.h; namely sec, min, hour, mday,	mon, year,
     wday, yday, and isdst.

     You may also import all the structure fields directly into	your namespace
     as	regular	variables using	the :FIELDS import tag.	 (Note that this still
     overrides your core functions.)  Access these fields as variables named
     with a preceding tm_ in front their method	names.	Thus, $tm_obj->mday()
     corresponds to $tm_mday if	you import the fields.

     The ctime() funtion provides a way	of getting at the scalar sense of the
     original CORE::localtime()	function.

     To	access this functionality without the core overrides, pass the use an
     empty import list,	and then access	function functions with	their full
     qualified names.  On the other hand, the built-ins	are still available
     via the CORE:: pseudo-package.

NOTE    [Toc]    [Back]

     While this	class is currently implemented using the Class::Struct module
     to	build a	struct-like class, you shouldn't rely upon this.

AUTHOR    [Toc]    [Back]

     Tom Christiansen


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
Time::gmtime IRIX by-name interface to Perl's built-in gmtime() function
locale IRIX Perl pragma to use and avoid POSIX locales for built-in operations
User::pwent IRIX by-name interface to Perl's built-in getpw*() functions
User::grent IRIX by-name interface to Perl's built-in getgr*() functions
Net::servent IRIX by-name interface to Perl's built-in getserv*() functions
Net::protoent IRIX by-name interface to Perl's built-in getproto*() functions
File::stat IRIX by-name interface to Perl's built-in stat() functions
Net::hostent IRIX by-name interface to Perl's built-in gethost*() functions
Net::netent IRIX by-name interface to Perl's built-in getnet*() functions
perljp OpenBSD AEuEU,i Perl Y~YxYE `A^a`I`A Perl xIAx3|xOxex|x3x1/2! Perl 5.8.0 xexeicUni- _ codeYuYYi1/4YEx~AcEyxE...
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service