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

WARNING

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

SEE ALSO

46       Date::Simple. Date::Manip.
47

AUTHOR

49       Tony Bowden
50

BUGS and QUERIES

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