CGI::Untaint::date(3pm) User Contributed Perl Documentation CGI::Untaint::date(3pm)NAME
CGI::Untaint::date - validate a date
SYNOPSIS
use CGI::Untaint;
my $handler = CGI::Untaint->new($q->Vars);
my $date = $handler->extract(-as_date => 'date');
DESCRIPTION
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):
"December 12, 2001"
"12th December, 2001"
"2001-12-12"
"next Tuesday"
"third Wednesday in March"
See Date::Manip for much more information on what date formats are acceptable.
The resulting date will be a Date::Simple object. Date::Simple for more information on this.
date_format
By default ambiguous dates of the format 08/09/2001 will be treated as UK style (i.e. 8th September rather than 9th August)
If you want to change this, subclass it and override date_format()
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!
SEE ALSO
Date::Simple. Date::Manip.
AUTHOR
Tony Bowden
BUGS and QUERIES
Please direct all correspondence regarding this module to:
bug-CGI-Untaint-date@rt.cpan.org
COPYRIGHT and LICENSE
Copyright (C) 2001-2005 Tony Bowden. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.0 2008-05-12 CGI::Untaint::date(3pm)
Check Out this Related Man Page
Date::Manip::Changes6(3) User Contributed Perl Documentation Date::Manip::Changes6(3)NAME
Date::Manip::Changes6 - backward incompatible changes in Date::Manip 6.xx
SYNOPSIS
This describes all backwards incompatible changes made to the Date::Manip module starting at version 6.00.
DESCRIPTION
For the most part, Date::Manip has remained backward compatible at every release, but occasionally, a change is made which is backward
incompatible. These are documented here. Major changes are marked with asterisks.
6.05
%z format
In Date::Manip 5.xx, the %z format in UnixDate printed the offset in the form -0500. In 6.00, I changed that to -05:00:00, but this
broke RFC 822 compliance.
I've changed %z back to -0500, and introduced a new format (%N) which returns -05:00:00.
Incidentally, this is the LAST unused letter, so I am now going to have to either stop adding formats, or add some extended format
syntax. Not sure yet which, but this may involve a backwards incompatible change in the future.
BUGS AND QUESTIONS
Please refer to the Date::Manip::Problems documentation for information on submitting bug reports or questions to the author.
SEE ALSO
Date::Manip - main module documentation
LICENSE
This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Sullivan Beck (sbeck@cpan.org)
perl v5.12.1 2010-01-12 Date::Manip::Changes6(3)
I am trying write a script that takes user input date in the format "Mar 18". If it is march1 it is like "Mar 1" . Once i take this input i will go back to my log files and search for any failed transactions recorded that day. If there are then i will send it to a file and mail it.
I am... (10 Replies)
Hi ,
i am trying to change my date from 2001-01-21 to current date in file datein1 this is how i did
date11=`date +"%y %m %d "`
sed -e "s/2001-01-21 /$date11/g" datein1 > dateout
it runs fine when i run manually but doen not work on cron (10 Replies)
Hey Guyz I have a requirement something like this..
a part of file name, date of modification of that file and a text is entered as input.
like
Date : 080206 (MMDDYY format.)
filename : hotel_rates
text : Jim
now the file hotel_rates.ZZZ.123 (creation date is Aug 02 2006) should be... (10 Replies)
Hello,
does somebody knows about a function that would convert a date like:
YYMMDD into a date like YYYY-MM-DD ?
Thank you for your ideas
:) (9 Replies)
Hello all,
I have a few questions regarding a UNIX script I've been asked to write (even though I barely know UNIX!).
I would like to write a script, that when run, will copy a file from one directory to another, copy and rename the same file with a datestamp to an archive directory, and them... (10 Replies)
Hi Gurus
I want to extract a date and version code which shall come in filename consisting of underscores.
The filename can contain any / one underscores but the version number will come after date and will be separted by underscore
String formats
=============
ABC_20090815_2.csv... (13 Replies)
I have a data file having first 19 characters having the date in the below format-
2010-04-29-00.00.00
I have to check this date field ( first 19 characters) against some specific dates and if date is not in 3 valid dates ( business date available to me , business date - 1 , businessdate... (10 Replies)
Hi
I have shell script and I am facing the below issue to integrate the date calculation to the the script.
If I give the $1 as the date(20110701) then I need to get the 7 days ago date for the same format.(20110624).
At first I thought its a simple one to handle and I did a search in the... (10 Replies)
Hi Experts,
I tried to stay away from posting stuff here and asking for help.
I want to print date valeu for a given variable and that is not working.
#!/bin/bash
START=`echo $1 | tr -d _`;
FV=`echo $2`
for (( c = 0 ; c < $FV ; c++ ))
do
# echo -n "`date --date="$START +$c day"... (12 Replies)
Hi,
I want to perform a simple date comparisons, i.e. select all files modified after a certain date (say 12-feb-2011)
I do not have the option of creating a file and using find's -newer option.
Any simple way to do this? I can do this by reading the stat command's output and comparing... (10 Replies)
Hi,
I have a variable which stores a date value in my script. let that be todays_date. This holds a date value which is based on some other calculation not relevant here.
I need the value of todays_date-1..ie previous date to this value...is that possible? (12 Replies)
So since I'm looking for an easy way to numberize files in a folder according to date:
Is there an easy script (batch, windows), that will rename files like this:
.earliest creation time: 001.file
older creatiin time : 002.file
even older time : 003.file
....
...
..
.
... (10 Replies)
I have Below Input :-
X1=03 ### Hour
Y1=20160405 ## Date
Z1=3 ## I want to Back 3 Hour
Output
List=03 02 01
Y1=20160405
Input:-
X1=02 ### Hour
Y1=20160405 ## Date
Z1=4 ## I want to Back 4 Hour
Output:-
List=02 01 24 23
Y1=20160404 ### Date Will Change (13 Replies)
I have written a code in Linux environment which compares two dates and print "correct" if 1st date is less than 2nd date. But when I'm running the same code in SunOS environment, "date -d is an illegal format" is the error it is throwing. How different should my code be so that it executes well in... (18 Replies)