.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "CGI::Untaint::date 3pm" .TH CGI::Untaint::date 3pm "2022-06-10" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" CGI::Untaint::date \- validate a date .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& use CGI::Untaint; \& my $handler = CGI::Untaint\->new($q\->Vars); \& \& my $date = $handler\->extract(\-as_date => \*(Aqdate\*(Aq); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" .SS "is_valid" .IX Subsection "is_valid" This Input Handler verifies that it is dealing with a reasonable date. Reasonably means anything that Date::Manip thinks is sensible, so you could use any of (for example): \*(L"December 12, 2001\*(R" \*(L"12th December, 2001\*(R" \*(L"2001\-12\-12\*(R" \*(L"next Tuesday\*(R" \*(L"third Wednesday in March\*(R" .PP See Date::Manip for much more information on what date formats are acceptable. .PP The resulting date will be a Date::Simple object. Date::Simple for more information on this. .SS "date_format" .IX Subsection "date_format" By default ambiguous dates of the format 08/09/2001 will be treated as \&\s-1UK\s0 style (i.e. 8th September rather than 9th August) .PP If you want to change this, subclass it and override \fBdate_format()\fR .SH "WARNING" .IX Header "WARNING" Date::Manip does not play nicely with taint mode. In order to work around this we locally clobber Date::Manip's 'timezone' code. As we're only interested in dates rather than times, this shouldn't be much of an issue. If it is, then please let me know! .SH "SEE ALSO" .IX Header "SEE ALSO" Date::Simple. Date::Manip. .SH "AUTHOR" .IX Header "AUTHOR" Tony Bowden .SH "BUGS and QUERIES" .IX Header "BUGS and QUERIES" Please direct all correspondence regarding this module to: bug\-CGI\-Untaint\-date@rt.cpan.org .SH "COPYRIGHT and LICENSE" .IX Header "COPYRIGHT and LICENSE" Copyright (C) 2001\-2005 Tony Bowden. All rights reserved. .PP This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.