Time::Fields

Time::Fields is a Perl module that contains abstract objects to store distinct time fields.
Download

Time::Fields Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Pip Stuart
  • Publisher web site:
  • http://search.cpan.org/~pip/XML-Tidy-1.2.54HJnFa/Tidy.pm

Time::Fields Tags


Time::Fields Description

Time::Fields is a Perl module that contains abstract objects to store distinct time fields. Time::Fields is a Perl module that contains abstract objects to store distinct time fields.SYNOPSIS package Time::Fields::NewChildPackageOfTimeFields; use base qw(Time::Fields); # NewChildPackageOfTimeFields definition...Time::Fields defines simple time objects with distinct fields for: Century, Year, Month, Day, hour, minute, second, frame, jink, zonealong with methods to manipulate those fields && modify their default presentation. Normally, a frame is one 60th-of-a- second && a jink is one 60th-of-a-frame or about 0.3 milliseconds. The plural for 'jink' is 'jinx'. Fields data && methods are meant to be inherited by other classes (namely Time::Frame && Time::PT) which implement specific useful interpretations of individual Time::Fields.USAGEnew(< InitType >, < InitData >)Time::Fields's constructor can be called as a class method to create a brand new object or as an object method to copy an existing object. Beyond that, new() can initialize Fields objects the following ways: * < packedB64InitStringImplies'str' > eg. Time::Fields->new('0123456789'); * 'str' => eg. Time::Fields->new('str' => '0123456789'); * 'list' => eg. Time::Fields->new('list' => ); * 'hash' => eg. Time::Fields->new('hash' => {'jink' => 8, 'year' => 2003})b< *Note* > If only a valid 'str'-type parameter is given to new (but no accompanying initialization value), the parameter is interpreted as an implied 'str' value. eg. Time::Fields->new('0123456789');This implied 'str'-type initialization will probably be the most common Time::Fields object creation mechanism when individual fields do not exceed 64 since this efficient representation is why the module was created.The following methods allow access to individual fields of existent Time::Fields objects: $t->C or $t->century $t->Y or $t->year $t->M or $t->month $t->D or $t->day $t->h or $t->hour $t->m or $t->minute $t->s or $t->second $t->f or $t->frame $t->j or $t->jink $t->z or $t->zoneAny combination of above single letters can be used as well. Following are some common useful examples: $t->hms # returns list of fields eg. $t->hms(12, 56, 34) # sets fields: h = 12, m = 56, s = 34 $t->hmsf # $t->hmsfj # $t->hmsfjz # $t->time # same as $t->hms $t->alltime # same as $t->hmsfjz $t->YMD # $t->MDY # $t->DMY # $t->CYMD # $t->date # same as $t->YMD $t->alldate # same as $t->CYMD $t->CYMDhmsfjz # $t->dt # same as $t->CYMDhmsfjz $t->all # same as $t->CYMDhmsfjz "$t" # same as $t->CYMDhmsfjzMonth / minute ExceptionsFields object method names can be in any case with the following exceptions. Special handling exists to resolve ambiguity between the Month && minute fields. If a lowercase 'm' is used adjacent to a 'y' or 'd' of either case, it is interpreted as Month. Otherwise, the case of the 'm' distinguishes Month from minute. An uppercase 'M' is ALWAYS Month. An adjacent uppercase 'H' or 'S' will not turn an uppercase 'M' into minute. Method names which need to specify Month or minute fields can also optionally be uniquely specified by their distinguishing vowel ('o' or 'i') instead of 'M' or 'm'. $t->ymd # same as $t->YMD $t->dmy # same as $t->DMY $t->MmMm # Month minute Month minute $t->HMS # hour Month second! NOT same as $t->hms $t->yod # same as $t->YMD $t->chmod # Century hour minute Month Day $t->FooIsMyJoy # frame Month Month minute second # Month Year jink Month YearRequirements:· PerlWhat's New in This Release:· combined Fields, Frame, && PT into one pkg (so see PT CHANGES section for updates to Fields or Frame)


Time::Fields Related Software