html::formfu::constraint::datetime(3pm) [debian man page]
HTML::FormFu::Constraint::DateTime(3pm) User Contributed Perl Documentation HTML::FormFu::Constraint::DateTime(3pm)NAME
HTML::FormFu::Constraint::DateTime - DateTime constraint
SYNOPSIS ---
elements:
- type: Text
name: start_date
constraints:
- type: DateTime
parser:
strptime: '%d-%m-%Y'
- type: Text
name: end_time
constraints:
- type: DateTime
parser:
regex: !!perl/regexp '^(d{2}) - (d{2}) - (d{4})$'
params: [day, month, year]
An example of using the same parser declaration for both a DateTime constraint and a DateTime inflator, using YAML references:
---
elements:
- type: Text
name: date
constraints:
- type: DateTime
parser: &PARSER
strptime: '%d-%m-%Y'
inflators:
- type: DateTime
parser: *PARSER
DESCRIPTION
Ensure input can later be inflated to a DateTime object.
METHODS
parser
Arguments: \%args
Required. Define the expected input string, so DateTime::Format::Builder knows how to turn it into a DateTime object.
Accepts arguments to be passed to "parser" in DateTime::Format::Builder.
AUTHOR
Carl Franks, "cfranks@cpan.org"
LICENSE
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2011-05-10 HTML::FormFu::Constraint::DateTime(3pm)
Check Out this Related Man Page
DateTime::Format::Builder::Parser::Strptime(3pm) User Contributed Perl Documentation DateTime::Format::Builder::Parser::Strptime(3pm)NAME
DateTime::Format::Builder::Parser::Strptime - strptime based date parsing
SYNOPSIS
my $parser = DateTime::Format::Builder->create_parser(
strptime => '%e/%b/%Y:%H:%M:%S %z',
);
SPECIFICATION
o strptime takes as its argument a strptime string. See DateTime::Format::Strptime for more information on valid patterns.
THANKS
See the main module's section.
SUPPORT
Support for this module is provided via the datetime@perl.org email list. See http://lists.perl.org/ for more details.
Alternatively, log them via the CPAN RT system via the web or email:
http://perl.dellah.org/rt/dtbuilder
bug-datetime-format-builder@rt.cpan.org
This makes it much easier for me to track things and thus means your problem is less likely to be neglected.
LICENCE AND COPYRIGHT
Copyright X Iain Truskett, 2003. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.000 or,
at your option, any later version of Perl 5 you may have available.
The full text of the licences can be found in the Artistic and COPYING files included with this module, or in perlartistic and perlgpl as
supplied with Perl 5.8.1 and later.
AUTHOR
Iain Truskett <spoon@cpan.org>
SEE ALSO
"datetime@perl.org" mailing list.
http://datetime.perl.org/
perl, DateTime, DateTime::Format::Builder
perl v5.10.1 2010-03-14 DateTime::Format::Builder::Parser::Strptime(3pm)
I am completely new to perl and am just going over the tutorials right now. What I am trying to attempt is to take the input from the HTML (in a form) and use those variables in a perl script. I've looked everywhere for a simple example on how to do this and cannot find it or do not understand... (5 Replies)
Hey Guys,
I have looked for a solution throughout the forum for my particular question, but I cant find one. So I'm sorry if I overlooked it. I need to be able to 48 add hours to a particular DateTime string.
I have a variable named $startTime
I would like to be able to take that... (1 Reply)
The perl parser below works as expected assuming the last digit in the NC_ before the . is a single digit.
perl -ne 'next if $. == 1;
if(/.*del(+)ins(+).*NC_0{4}(+).*g\.(+)_(+)/) # indel
{
print join("\t", $3, $4, $5, $1, $2), "\n";
}
' out_position.txt > out1.txt
... (8 Replies)