Re: Time and Date

2002-08-20 Thread david zhuo
You should be aware that your have multiple gmtime() function calls in your script and this could cause problem. the reason is because between your first and second gmtime() function call, some times have passed(yes, very very very little but...) so the time return by the 2 gmtime() functions

Re: Time and Date

2002-08-20 Thread David Zhuo
$hour = 1; $hour = sprintf("%02d",$hour); // $hour now become "01" $hour = 10; $hour = sprintf("%02d",$hour); // $hour still "10" no need for the checking it's length. david "A Taylor" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi all, > Thanks for your

Re: time and date

2002-08-20 Thread David Zhuo
do you want to extract the date and time string in your email message(header) or that you want to know what time does the email arrive? david "A Taylor" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I am trying to get the time and date that some one sends me

Re: Time and Date

2002-08-19 Thread Elaine -HFB- Ashton
A Taylor [[EMAIL PROTECTED]] quoth: *> *>Also I have had to add 1 to the hour var: $hour ++; even though my web *>space providers are in the same country as me - does anyone know why this *>is - I am probably being a bit daft - well it is 1am, and I have been *>perling for about 16 hours now !!

Re: Time and Date

2002-08-19 Thread John W. Krahn
A Taylor wrote: > > Hi all, Hello, > Thanks for your help so far - I have managed to sort out my time and date > problem but there are a few points that I dont understand. > The code I have used is as follows: > > # get the hours, mins, weekday, day, month and year > $hour = (gmtime)[2]; > $

Re: time and date

2002-08-19 Thread Kevin Meltzer
Hi Anadi, You want to take a look at the MIME-tools, specifically MIME::Parser and MIME::Head (look for MIME::Tools on http://search.cpan.org). If that seems too heavy duty for your needs, take a look at the Mail::* modules on the CPAN. Also look there for ways to access the mail, if you haven'

Re: Time and date formats

2002-03-01 Thread Brett W. McCoy
On Fri, 1 Mar 2002, Troy May wrote: > What do the letters after the "%02" mean? I know about "%02d", but I came > across a few scripts with "%02u" in it. I've never seen that, what does it > mean? What's the difference between the "d" and the "u"? And what ELSE can > you possibly use there?

RE: Time and date formats

2002-03-01 Thread Timothy Johnson
Check the documentation on sprintf(). I don't have perl with me, but I think "perldoc -f sprintf" will find it, otherwise you can look through the perlfunc section of the docs for sprintf. Offhand I'd guess that %02u refers to an unsigned integer in decimal format? -Original Message-