1CGI::Untaint::date(3) User Contributed Perl DocumentationCGI::Untaint::date(3)
2
3
4

NAME

6       CGI::Untaint::date - validate a date
7

SYNOPSIS

9         use CGI::Untaint;
10         my $handler = CGI::Untaint->new($q->Vars);
11
12         my $date = $handler->extract(-as_date => 'date');
13

DESCRIPTION

15   is_valid
16       This Input Handler verifies that it is dealing with a reasonable date.
17       Reasonably means anything that Date::Manip thinks is sensible, so you
18       could use any of (for example):
19         "December 12, 2001"
20         "12th December, 2001"
21         "2001-12-12"
22         "next Tuesday"
23         "third Wednesday in March"
24
25       See Date::Manip for much more information on what date formats are
26       acceptable.
27
28       The resulting date will be a Date::Simple object.  Date::Simple for
29       more information on this.
30
31   date_format
32       By default ambiguous dates of the format 08/09/2001 will be treated as
33       UK style (i.e. 8th September rather than 9th August)
34
35       If you want to change this, subclass it and override date_format()
36

WARNING

38       Date::Manip does not play nicely with taint mode. In order to work
39       around this we locally clobber Date::Manip's 'timezone' code. As we're
40       only interested in dates rather than times, this shouldn't be much of
41       an issue. If it is, then please let me know!
42

SEE ALSO

44       Date::Simple. Date::Manip.
45

AUTHOR

47       Tony Bowden
48

BUGS and QUERIES

50       Please direct all correspondence regarding this module to:
51         bug-CGI-Untaint-date@rt.cpan.org
52
54       Copyright (C) 2001-2005 Tony Bowden. All rights reserved.
55
56       This module is free software; you can redistribute it and/or modify it
57       under the same terms as Perl itself.
58
59
60
61perl v5.12.0                      2005-09-26             CGI::Untaint::date(3)
Impressum