Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rose::datetime::parser(3pm) [debian man page]

Rose::DateTime::Parser(3pm)				User Contributed Perl Documentation			       Rose::DateTime::Parser(3pm)

NAME
Rose::DateTime::Parser - DateTime parser object. SYNOPSIS
use Rose::DateTime::Parser; $parser = Rose::DateTime::Parser->new(time_zone => 'UTC'); $dt = $parser->parse_date('4/30/2001 8am') or warn $parser->error; DESCRIPTION
Rose::DateTime::Parser encapsulates a particular kind of call to Rose::DateTime::Util's parse_date and parse_european_date functions. The object maintains the desired time zone, which is then passed to each call. This class inherits from, and follows the conventions of, Rose::Object. See the Rose::Object documentation for more information. CONSTRUCTOR
new PARAMS Constructs a new Rose::DateTime::Parser object based on PARAMS, where PARAMS are name/value pairs. Any object method is a valid parameter name. OBJECT METHODS
error [ERROR] Get or set the error message string. european [BOOL] Get or set a boolean value that controls how the parse_date method will interpret "xx/xx/xxxx" dates: either month/day/year or year/month/day. If true, then the parse_date method will pass its arguments to Rose::DateTime::Util's parse_european_date function, which interprets such dates as "dd/mm/yyyy". If false, then the parse_date method will temporarily force non-European date parsing and then call Rose::DateTime::Util's parse_date function, which will interpret the date as "mm/dd/yyyy". This attribute defaults to the value returned by the Rose::DateTime::Util->european_dates class method called at the time the Rose::DateTime::Parser object is constructed. If the BOOL argument is undefined (instead of "false, but defined") then the attribute will return to its default value by calling the Rose::DateTime::Util->european_dates class method again. To unambiguously set the attribute to true or false, pass a defined value like 1 or 0. parse_date STRING Attempt to parse STRING by passing it to Rose::DateTime::Util's parse_date or parse_european_date function. The choice is controlled by the european attribute. If parsing is successful, the resulting DateTime object is returned. Otherwise, error is set and false is returned. parse_datetime STRING This method is an alias for parse_date() parse_european_date STRING Attempt to parse STRING by passing it to Rose::DateTime::Util's parse_european_date function (regardless of the value of the european attribute). If parsing is successful, the resulting DateTime object is returned. Otherwise, error is set and false is returned. time_zone [STRING] Get or set the time zone string passed to Rose::DateTime::Util's parse_date function. Defaults to the value returned by the Rose::DateTime::Util->time_zone class method. AUTHOR
John C. Siracusa (siracusa@gmail.com) LICENSE
Copyright (c) 2010 by John C. Siracusa. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.3 2010-03-23 Rose::DateTime::Parser(3pm)

Check Out this Related Man Page

MooseX::Types::DateTime(3pm)				User Contributed Perl Documentation			      MooseX::Types::DateTime(3pm)

NAME
MooseX::Types::DateTime - DateTime related constraints and coercions for Moose VERSION
version 0.10 SYNOPSIS
Export Example: use MooseX::Types::DateTime qw(TimeZone); has time_zone => ( isa => TimeZone, is => "rw", coerce => 1, ); Class->new( time_zone => "Africa/Timbuktu" ); Namespaced Example: use MooseX::Types::DateTime; has time_zone => ( isa => 'DateTime::TimeZone', is => "rw", coerce => 1, ); Class->new( time_zone => "Africa/Timbuktu" ); DESCRIPTION
This module packages several Moose::Util::TypeConstraints with coercions, designed to work with the DateTime suite of objects. CONSTRAINTS
DateTime A class type for DateTime. from "Num" Uses "from_epoch" in DateTime. Floating values will be used for sub-second precision, see DateTime for details. from "HashRef" Calls "new" in DateTime with the hash entries as arguments. Duration A class type for DateTime::Duration from "Num" Uses "new" in DateTime::Duration and passes the number as the "seconds" argument. Note that due to leap seconds, DST changes etc this may not do what you expect. For instance passing in 86400 is not always equivalent to one day, although there are that many seconds in a day. See "How Date Math is Done" in DateTime for more details. from "HashRef" Calls "new" in DateTime::Duration with the hash entries as arguments. DateTime::Locale A class type for DateTime::Locale::root with the name DateTime::Locale. from "Str" The string is treated as a language tag (e.g. "en" or "he_IL") and given to "load" in DateTime::Locale. from Locale::Maktext The "Locale::Maketext/language_tag" attribute will be used with "load" in DateTime::Locale. DateTime::TimeZone A class type for DateTime::TimeZone. from "Str" Treated as a time zone name or offset. See "USAGE" in DateTime::TimeZone for more details on the allowed values. Delegates to "new" in DateTime::TimeZone with the string as the "name" argument. SEE ALSO
MooseX::Types::DateTime::MoreCoercions DateTime, DateTimeX::Easy AUTHOR
Yuval Kogman <nothingmuch@woobling.org> John Napiorkowski <jjn1056 at yahoo.com> COPYRIGHT
Copyright (c) 2008 Yuval Kogman. All rights reserved This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2014-02-03 MooseX::Types::DateTime(3pm)
Man Page