Re: Convert Date to Timestamp.

2006-11-03 Thread John W. Krahn
Sara wrote: > I am getting Month, Day and Year from Drop Downs of a form to convert given > values to Unix timestamp. I am able to put values in all the variables > below except for $wday & $yday. Any ideas as how I can get those with > limited user input of month, day and year only? > > #!/usr/l

Re: Convert Date to Timestamp.

2006-11-01 Thread Mumia W.
On 11/01/2006 12:04 AM, Sara wrote: I am getting Month, Day and Year from Drop Downs of a form to convert given values to Unix timestamp. I am able to put values in all the variables below except for $wday & $yday. Any ideas as how I can get those with limited user input of month, day and year

Re: Convert Date to Timestamp.

2006-11-01 Thread David Romero
See the Date::Parse Module from cpan On 10/31/06, Sara <[EMAIL PROTECTED]> wrote: I am getting Month, Day and Year from Drop Downs of a form to convert given values to Unix timestamp. I am able to put values in all the variables below except for $wday & $yday. Any ideas as how

RE: Convert Date to Timestamp.

2006-11-01 Thread Charles K. Clarkson
Sara wrote: : I am getting Month, Day and Year from Drop Downs of a form to : convert given values to Unix timestamp. : I am able to put values in all the variables below except for : $wday & $yday. Any ideas as how I can get those with limited : user input of month, da

Convert Date to Timestamp.

2006-10-31 Thread Sara
I am getting Month, Day and Year from Drop Downs of a form to convert given values to Unix timestamp. I am able to put values in all the variables below except for $wday & $yday. Any ideas as how I can get those with limited user input of month, day and year only? #!/usr/local/bin/perl use POSI

Re: File Modification Date

2005-09-14 Thread Wiggins d'Anconia
Vance M. Allen wrote: > I'm trying to find out how to determine the date and/or time that a file was > created in a simple procedure. I have heard about a few different libraries > but the examples I have found haven't been very useful. > > The basic purpose I want

Re: File Modification Date

2005-09-14 Thread Paul Archer
perldoc -q timestamp 12:42am, Vance M. Allen wrote: I'm trying to find out how to determine the date and/or time that a file was created in a simple procedure. I have heard about a few different libraries but the examples I have found haven't been very useful. The basic purpose I

File Modification Date

2005-09-14 Thread Vance M. Allen
I'm trying to find out how to determine the date and/or time that a file was created in a simple procedure. I have heard about a few different libraries but the examples I have found haven't been very useful. The basic purpose I want to do is a simple footer provided by a packa

Re: Finding date when a file was created

2004-08-20 Thread Wiggins d Anconia
file or > > its metadata via ctime. That's probably close to "creation" as you > > would probably mean it or need it. > > This is what I'm mostly unclear on. What exactly does ctime represent? > I think the only descriptions I found said something like "ctime

Re: Finding date when a file was created

2004-08-20 Thread Bill Stephenson
robably mean it or need it. This is what I'm mostly unclear on. What exactly does ctime represent? I think the only descriptions I found said something like "ctime is not the creation date of a file, it is the epoch seconds from the time the script was started." When is a file'

Re: Finding date when a file was created

2004-08-19 Thread Randal L. Schwartz
> "Bill" == Bill Stephenson <[EMAIL PROTECTED]> writes: Bill> I'm sure there is some valid reason for not tracking file creation Bill> dates but I fail to figure it out on my own. The founding fathers of Unix deliberately left out "creation time" because the concept is ambiguous at best. The

Re: Finding date when a file was created

2004-08-18 Thread Bill Stephenson
to ask is "Does your file system track File Creation Date?" Many file systems don't. The -C function in perl does /not/ return the file creation time. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

RE: Finding date when a file was created

2004-08-17 Thread Charles K. Clarkson
Bill Stephenson <[EMAIL PROTECTED]> wrote: : Does anyone have example code that loops through a : directory of files and prints a list of those created : within a user selected date range. : : Here's what I've got so far, but it doesn't get the : date the file was create

Finding date when a file was created

2004-08-17 Thread Bill Stephenson
Does anyone have example code that loops through a directory of files and prints a list of those created within a user selected date range. Here's what I've got so far, but it doesn't get the date the file was created and I can't seem to find out how to do that: K

Re: Modify date table

2004-02-08 Thread Jan Eden
smrtalec wrote: > >>Now the tricky thing: As long as there was an error in my script, it >>was >displayed in >my browser (thanks to CGI::Carp). But as soon as I >eliminated the obvious errors, I >get an Internal Server Error >(testing on my ISP's linux web server and on my local >OS X box, both >

Re: Modify date table

2004-02-08 Thread smrtalec
>Now the tricky thing: As long as there was an error in my script, it was displayed in >my browser (thanks to CGI::Carp). But as soon as I eliminated the obvious errors, I >get an Internal Server Error (testing on my ISP's linux web server and on my local >OS X box, both running Apache). > >Can an

Re: Modify date table

2004-02-07 Thread Jan Eden
Sorry for double posting, I found the error myself. The script does not have the permission to write to my site. Now the obvious question is: How can I change this? I will try to find out. Thanks, Jan -- There's no place like ~/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

Modify date table

2004-02-07 Thread Jan Eden
Hi all, I want to modify the occupation table for a holiday house. This is my (quite naive) approach: Belegung 2004 15 10 15 20 25 30 Januar   Table cells of class "belegt" appear in red, class "frei" appears in green. Now I have an HTML fo

Re: Date to seconds

2003-09-17 Thread Rob Dixon
Kit-Wing Li wrote: > > Does anybody know of a quick method in perl to turn a date string into its > equivalent in seconds, include milliseconds if possible? Ex: 20030910 > 13:50:25.6 to 1063202644. Thanks much! The Date::Manip module will do it for you easily, as long as you&#x

Re: Date to seconds

2003-09-11 Thread Alexander Blüm
Li, Kit-Wing wrote: Hi, Does anybody know of a quick method in perl to turn a date string into its equivalent in seconds, include milliseconds if possible? > Ex: 20030910 13:50:25.6 to 1063202644. Thanks much! starting when? I mean, you 1063202644 seconds, and these are 33years : 37we

Date to seconds

2003-09-11 Thread Li, Kit-Wing
Hi, Does anybody know of a quick method in perl to turn a date string into its equivalent in seconds, include milliseconds if possible? Ex: 20030910 13:50:25.6 to 1063202644. Thanks much! -- This message is intended

Re: Retrieving cookie expiration date

2003-07-16 Thread Octavian Rasnita
Could you tell us how to do that? I've seen that the cookie is returned by the browsers in the HTTP_COOKIE environment variable in the form: HTTP_COOKIE=cookie_name=cookie_value;next_cookie_name=next_cookie_value; but no expiration date is sent. I don't think the CGI module is able t

RE: Retrieving cookie expiration date

2003-07-16 Thread Kipp, James
read 'perldoc cgi', go to the http cookies section. you can retrieve a cookie into a hash which will include the exp date. HTH Jim -Original Message- From: Sawsan Sarandah [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 16, 2003 12:44 AM To: [EMAIL PROTECTED] Subject: Retriev

Re: Retrieving cookie expiration date

2003-07-16 Thread Octavian Rasnita
No, the expiration date is not sent by the browsers back to the server. The browser only checks if the cookie is not expired, and if it is not, it sends it, otherwise it doesn't. Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - Fro

Retrieving cookie expiration date

2003-07-15 Thread Sawsan Sarandah
Greetings, Is it possible using cgi.pm or other means to extract the expiration date & time of a cookie on a remote computer? If yes, how? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Doing time/date calculations

2003-06-23 Thread fliptop
On Sun, 22 Jun 2003 at 16:57, Scot Robnett opined: SR:How would one go about determining if something is 3 days old, 3 months old, SR:1 year old, etc., based on the following scenario? SR: SR:The date that a user subscribes to our site is stored in a MySQL database in SR:the DATE format -mm

Doing time/date calculations

2003-06-22 Thread Scot Robnett
How would one go about determining if something is 3 days old, 3 months old, 1 year old, etc., based on the following scenario? The date that a user subscribes to our site is stored in a MySQL database in the DATE format -mm-dd. So column 'SubscribeDate' looks like 2003-06-18, fo

Date

2003-06-17 Thread Van Andel, Robbert
How do I retrieve the system's current hour and date and assign them to a variable? Robbert van Andel

Re: Date

2003-06-17 Thread Casey West
It was Tuesday, June 17, 2003 when Van Andel, Robbert took the soap box, saying: : How do I retrieve the system's current hour and date and assign them to a : variable? Perl's builtin function called 'localtime' can help you here. It returns a list of information about the c

Re: Date Range

2003-01-29 Thread Wiggins d'Anconia
Melissa Stranzl wrote: Hi all, This is part of a perl program I wrote that doesn't compile. I am trying to get my database to search by date- to have current and past events come up. Anyway, based on the following code, I get an error message that reads: can't locate object method

Re: Date Range

2003-01-29 Thread Bob Showalter
Melissa Stranzl wrote: > Hi all, > > This is part of a perl program I wrote that doesn't > compile. I am trying to get my database to search by > date- to have current and past events come up. > Anyway, based on the following code, I get an error > message that read

Date Range

2003-01-29 Thread Melissa Stranzl
Hi all, This is part of a perl program I wrote that doesn't compile. I am trying to get my database to search by date- to have current and past events come up. Anyway, based on the following code, I get an error message that reads: can't locate object method "new" via

Re: Date

2003-01-21 Thread david
Mad Hatter wrote: > I am writing a cgi script to run as a cron job. when > it runs i need the date of 'one year ago today' in the > format '-MM-DD' to be stored in a variable to be > used later in the script. I am about as dumb as wet > dirt when it comes

Re: Date

2003-01-21 Thread Octavian Rasnita
t days. Perhaps it will put just 1, 2, 3... and you might need to change this a little. Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: "Mad Hatter" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, Jan

Re: Date

2003-01-21 Thread WilliamGunther
In a message dated 1/21/2003 12:15:36 AM Eastern Standard Time, [EMAIL PROTECTED] writes: > I am writing a cgi script to run as a cron job. when > it runs i need the date of 'one year ago today' in the > format '-MM-DD' to be stored in a variable to be >

Date

2003-01-20 Thread Mad Hatter
I am writing a cgi script to run as a cron job. when it runs i need the date of 'one year ago today' in the format '-MM-DD' to be stored in a variable to be used later in the script. I am about as dumb as wet dirt when it comes to cgi. Can someone please help me

Re: How to get the last_modified date?

2002-09-22 Thread Jimmy George
Put the ssi in if you are reading the file from a server. I haven't tried it though. JimmyG -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: How to get the last_modified date?

2002-09-22 Thread Wiggins d'Anconia
LWP module and I am trying to get the last modified date of > an .shtml page. > If the file is an .html, I can get the date with no problem, but if the file > is .shtml, the last_modified is "". > > I've tried using the $ENV for a local .shtml file and I had the same resu

How to get the last_modified date?

2002-09-22 Thread Octavian Rasnita
Hi all, I am using the LWP module and I am trying to get the last modified date of an .shtml page. If the file is an .html, I can get the date with no problem, but if the file is .shtml, the last_modified is "". I've tried using the $ENV for a local .shtml file and I had the

Re: Date Question(s)

2002-09-18 Thread Wiggins d'Anconia
Date::Calc is a wonderful thing. If that doesn't work however I would suggest just storing the number of seconds from epoch (aka time) in the log file. Then you simply subtract 30 days worth of seconds aka, 60*60*24*30 seconds -> which you can just use the constant for whatever that c

Re: Date Question(s)

2002-09-18 Thread William McKee
I'd suggest checking out Date::Manip from CPAN. I use it to do date comparisons in some of my scripts. Why do you need to convert the date when writing it to the file. Just save the epoch time and use Date::Manip to eval the epoch time in the file to the current epoch time. William --

Re: Date Question(s)

2002-09-18 Thread fliptop
On Wed, 18 Sep 2002 at 12:53, [EMAIL PROTECTED] opined: [snip] n:My problem with this scenario involves my lack of knowledge in -- n: n:A. ... first converting a current system date to a string date (which can n:be appended to a text log file). n:B. ... or comparing the logged initial-question

Date Question(s)

2002-09-18 Thread [EMAIL PROTECTED]
Hello everyone. I have a situation involving the DATE and DATE COMPARISON functions which I need some guidance on. The situation is this: 1. The end-users who visit my Site are allowed to ask a participating medical expert, one medical question per month. However, some are abusing this

Re: Sorting files by date (in first line)

2002-07-08 Thread Shannon Murdoch
rticle [EMAIL PROTECTED], "Shannon Murdoch" <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a list of 40 or so files that need to be sorted into an array by > article date (found in first line of each file in the form DD-MM-). > I can't figure out how to g

Sorting files by date (in first line)

2002-07-08 Thread Shannon Murdoch
Hi all, I have a list of 40 or so files that need to be sorted into an array by article date (found in first line of each file in the form DD-MM-). I can't figure out how to go about it successfully... Can anyone help me out please?? Thanks in advance! Current method is as follows:

Re: convert date value into text value..

2002-05-22 Thread David vd Geer Inhuur tbv IPlib
Hi Sven, I think you have to do it on another way. Better to let perl find your date. #!/usr/bin/perl use Time::localtime $tijd = localtime; $year = $tijd->year+1900 print $tijd->sec; print "Wir leben heute am jahr: $year"; In this order we have : sec Seconds min

convert date value into text value..

2002-05-22 Thread Sven Bentlage
Hi ! How can I convert a date value (I get via /bin/date) into a text value? Thanks for your help. Sven -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Validating form date

2002-04-10 Thread fliptop
Daniel Falkenberg wrote: > I am just playing around with forms at the moment. What I want to do is > have user enter data into form fiels then I want to validate that > entered date. So far I can do things as basic as validating if fields > contain characters and so forth. But wh

Validating form date

2002-04-09 Thread Daniel Falkenberg
Hello all, I am just playing around with forms at the moment. What I want to do is have user enter data into form fiels then I want to validate that entered date. So far I can do things as basic as validating if fields contain characters and so forth. But what I want to do is something like

Re: Yesterday's date

2002-04-07 Thread fliptop
Troy May wrote: > What's the easiest way to get yesterday's date from localtime? I need it in > this format: (for today) "070402". use Date::Calc qw{ Today Add_Delta_Days }; my @date = Add_Delta_Days(Today, -1); printf "Yesterday: %02u%02u%02u",

Yesterday's date

2002-04-07 Thread Troy May
What's the easiest way to get yesterday's date from localtime? I need it in this format: (for today) "070402". Here is the code used for today's date: ($sec,$min,$hour,$mday,$mon,$year,undef,undef,undef) = localtime(); $mon++; $year %= 100; $theDate = sprintf(&q

Re: Date format again

2002-03-03 Thread fliptop
Troy May wrote: > Hello, this guy finally emailed his script to me. The problem he is having > is with "$year". Here's the dating part of the code: > > --- > $date = `/bin/date`; > chop($date); has this guy c

Date format again

2002-03-03 Thread Troy May
Hello, this guy finally emailed his script to me. The problem he is having is with "$year". Here's the dating part of the code: --- $date = `/bin/date`; chop($date); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime; $thisday

Re: if the date entered is weekend or no?

2002-02-10 Thread Ged Haywood
Hi there, On 11 Feb 2002, simran wrote: > Try one of the many Date::* modules... > > On Sun, 2002-02-10 at 06:21, GsuLinuX wrote: > > How can i understand if the date entered by the client is weekend or no? Are there >some database specificied for that? Why not try

Re: if the date entered is weekend or no?

2002-02-10 Thread simran
Try one of the many Date::* modules... On Sun, 2002-02-10 at 06:21, GsuLinuX wrote: > How can i understand if the date entered by the client is weekend or no? Are there >some database specificied for that? > > funky > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additio

Re: if the date entered is weekend or no?

2002-02-10 Thread fliptop
[reply post not cc'd to modperl list] GsuLinuX wrote: > How can i understand if the date entered by the client is weekend or no? > Are there some database specificied for that? http://search.cpan.org/search?dist=Date-Calc there's a function in there called Day_of_Week(), whi

if the date entered is weekend or no?

2002-02-09 Thread GsuLinuX
How can i understand if the date entered by the client is weekend or no? Are there some database specificied for that? funky

best way to validate a date/time

2002-02-05 Thread John
I have a date/time in a variable like "12/30/2002 15:00" and I need to validate it. The time might not appear there. I can be sure of the format, but I want to reject things like month 13, day 32, February 30, hour 24, wrong leap year stuff, etc. What is the best way to validate

RE: Date Functions

2002-02-01 Thread Bob Showalter
> -Original Message- > From: David Gilden [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 31, 2002 5:28 PM > To: [EMAIL PROTECTED] > Subject: Date Functions > > > Hi, > > I am updating an old Script. > > Are there any problems or 'Y2k

Date Functions

2002-01-31 Thread David Gilden
Hi, I am updating an old Script. Are there any problems or 'Y2k' bugs, in the following change? Thanks, Dave #!/usr/bin/perl use CGI qw/:standard/; use CGI::Carp qw(fatalsToBrowser); use POSIX 'strftime'; # NEW -- replaces the block below $date = strftime(

Re: Calculate date 30 days ahead

2001-12-24 Thread Andrea Holstein
Rene Verharen wrote: > > Hi, > > I need to calculate the date exactly 30 days ahead. Can I do this from > localtime or do I need a certain module ? > You can do it with localtime, but the best is using the excellent CPAN module Date::Calc. It's very simple and has a

Calculate date 30 days ahead

2001-12-23 Thread Rene Verharen
Hi, I need to calculate the date exactly 30 days ahead. Can I do this from localtime or do I need a certain module ? Thanks for your help. Vriendelijke groet, Rene Verharen [EMAIL PROTECTED] http://www.verharen.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands

Re: Converting Date to Epoch Seconds

2001-11-30 Thread Randal L. Schwartz
>>>>> "Dale" == Dale Pellerin <[EMAIL PROTECTED]> writes: Dale> How do you convert a date that is already in the format MMDD into Epoch Dale> seconds? Dale> $date = 20011130 Presuming you want midnight localtime for that date: my $date = &quo

Converting Date to Epoch Seconds

2001-11-30 Thread Pellerin, Dale
How do you convert a date that is already in the format MMDD into Epoch seconds? $date = 20011130 Thank you. Dale

Re: String to Date conversion

2001-09-10 Thread Gunther Birznieks
At 08:42 PM 9/10/2001 -0400, [EMAIL PROTECTED] wrote: >Hello, >Can some one please suggest me a pointer to do easy date manipulations in >perl. >I have dates as strigs I need to compare 2 dates and may >be sort an array of dates(Strings). > >Thanks >s- Look at the Date

String to Date conversion

2001-09-10 Thread SAKHAT
Hello, Can some one please suggest me a pointer to do easy date manipulations in perl. I have dates as strigs I need to compare 2 dates and may be sort an array of dates(Strings). Thanks s- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Date

2001-07-26 Thread WPhillips
Fred, I don't know if this will help, but I have this code that figures out what yesterday's date is. It should be relatively simple to change it to two days ago. I am sure that there are easier ways to do it, but this has been working for me for a long time. The only two caveats

RE: Date

2001-07-25 Thread Bradley M. Handy
Also, take a local a the Date::Calc module for the date arithmetic. Brad Handy --www.jack-of-all-trades.net [EMAIL PROTECTED] > -Original Message- > From: Venkat Mohan [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 25, 2001 12:58 PM > To: 'Fred Sahakian';

RE: Date

2001-07-25 Thread Venkat Mohan
You can use Time::Local package. There is a function timelocal takes the seconds, minutes, hours, day, month, year and returns epoch seconds. - Venkat -Original Message- From: Fred Sahakian [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2001 9:53 AM To: < Subject: Date Im St

Date

2001-07-25 Thread Fred Sahakian
Im Stuck! I need to figure out how to covert a date such as 10242001 into Epoch time or another format where as I can subtract 2 calendar dates and get a number. thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: comparing date values

2001-06-11 Thread Evgeny Goldin (aka Genie)
I'm using the DateTime::Precise for any date manipulation. It's good. Really good.

Re: comparing date values

2001-06-11 Thread Aaron Craig
At 12:45 08.06.2001 -0700, you wrote: >--- Brian Hersey <[EMAIL PROTECTED]> wrote: > > my $presesntdate = (localtime); > > my ( $day, $month, $year ) = (localtime)[3..5]; > $month++; # assume you want 1-12 instead of 0-11 > $year += 1900; > > > 2.

Re: comparing date values

2001-06-08 Thread Curtis Poe
--- Brian Hersey <[EMAIL PROTECTED]> wrote: > my $presesntdate = (localtime); my ( $day, $month, $year ) = (localtime)[3..5]; $month++; # assume you want 1-12 instead of 0-11 $year += 1900; > 2. How do I compare the date values, so that I can get a numerical value of >

Re: comparing date values

2001-06-08 Thread Justin Simoni
() is a really funky function that returns different contexes depending on what you give it. usually, to display a date quick and dirty, you write something like this: print scalar(localtime); which does come in handy when making logging thingies. -- justin simoni

comparing date values

2001-06-08 Thread Brian Hersey
Hi All, OK, I'm REALLY new to Perl, and programming in general (I know, *sigh*) but I have what should be a pretty simple question. I'm trying to make a logon feature for a site that would compare 2 dates, one in a MySQL database of when a user has registered with a service and the pr