Perl Cd Bookshelf [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Perl Cd Bookshelf [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید



8.226. Time::localtime


Replaces Perl's core
localtime function with a version that returns
Time::tm objects. Exports two functions.

ctime


$ct = ctime( )

Overrides the core localtime function in scalar
context; returns a string with the date and time:

use Time::gmtime;
$ct = ctime( );
print $ct

Then the output of the print command looks like:

Thu Apr 9 16:50:10 1998

localtime


$lt = localtime( )

Overrides the core localtime function. The
Time::tm object returned has methods with the same names as the
structure fields they return. That is, to return the field
mon, use the mon method:

use Time::localtime;
$lt = localtime( );
print $lt->mon;

The field names (and therefore the method names) are the same as the
names of the fields in the tm structure in the C
file time.h: sec,
min, hour,
mday, mon,
year, wday,
yday, and isdst. You can access
the fields with the methods or by importing the fields into your
namespace with the :FIELDS import tag and prepending
tm_ to the method name (for example,
$tm_mon).



8.225. Time::Local8.227. Time::tm




Copyright © 2002 O'Reilly & Associates. All rights reserved.

/ 875