Re: [PHP] calculate the time that day ends

2009-02-04 Thread Shawn McKenzie
Lupus Michaelis wrote: Shawn McKenzie a écrit : STFW That's not so fair. If Thodoris ask about day end, it is obvious he's wrong with the word. Wrong because he isn't mastering english. So, without the good word (sunset), he can't find. So please don't bash us when we appear silly !

Re: [PHP] calculate the time that day ends

2009-02-04 Thread tedd
At 8:59 AM +0100 2/4/09, Lupus Michaelis wrote: Shawn McKenzie a écrit : STFW That's not so fair. If Thodoris ask about day end, it is obvious he's wrong with the word. Wrong because he isn't mastering english. So, without the good word (sunset), he can't find. So please don't bash us

[PHP] calculate the time that day ends

2009-02-03 Thread Thodoris
Hi gang, I was wondering if there is way to find out what is the time that every day ends? I am planning to add this to the first page on an interface I am developing. -- Thodoris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] calculate the time that day ends

2009-02-03 Thread Stuart
2009/2/3 Thodoris t...@kinetix.gr: I was wondering if there is way to find out what is the time that every day ends? I am planning to add this to the first page on an interface I am developing. Most days end at midnight, but there may be some exceptions ;-) Seriously though, not really

Re: [PHP] calculate the time that day ends

2009-02-03 Thread Dan Shirah
Hi gang, I was wondering if there is way to find out what is the time that every day ends? I am planning to add this to the first page on an interface I am developing. -- Thodoris Doesn't every day end at 23:59:59? the next second would be 00:00:00...the beginning of a new day! :) So

Re: [PHP] calculate the time that day ends

2009-02-03 Thread Thodoris
2009/2/3 Thodoris t...@kinetix.gr: I was wondering if there is way to find out what is the time that every day ends? I am planning to add this to the first page on an interface I am developing. Most days end at midnight, but there may be some exceptions ;-) Seriously though, not

RES: [PHP] calculate the time that day ends

2009-02-03 Thread Jônatas Zechim
Try: echo date(H:i:s, mktime(23-date(H), 59-date(i), 59-date(s)); -Mensagem original- De: Thodoris [mailto:t...@kinetix.gr] Enviada em: terça-feira, 3 de fevereiro de 2009 14:38 Para: Stuart Cc: php-general@lists.php.net Assunto: Re: [PHP] calculate the time that day ends 2009/2/3

Re: [PHP] calculate the time that day ends

2009-02-03 Thread Shawn McKenzie
Thodoris wrote: 2009/2/3 Thodoris t...@kinetix.gr: I was wondering if there is way to find out what is the time that every day ends? I am planning to add this to the first page on an interface I am developing. Most days end at midnight, but there may be some exceptions ;-)

Re: RES: [PHP] calculate the time that day ends

2009-02-03 Thread Thodoris
Try: echo date(H:i:s, mktime(23-date(H), 59-date(i), 59-date(s)); This is I guess how much time we have to reach midnight. But the question is how to calculate the time that sun stops showing its refreshing light. BTW try not to top post -- Thodoris -- PHP General Mailing List

Re: [PHP] calculate the time that day ends

2009-02-03 Thread Shawn McKenzie
. Of course Blade is an exception thrown out of the blue. STFW http://www.google.com/search?q=calculate+sunset+formula Wow, also: http://www.google.com/search?q=php+calculate+sunset Yields this gem: http://www.w3schools.com/php/func_date_sunset.asp -- Thanks! -Shawn http://www.spidean.com

Re: [PHP] calculate the time that day ends

2009-02-03 Thread Shawn McKenzie
burning himself. Of course Blade is an exception thrown out of the blue. STFW http://www.google.com/search?q=calculate+sunset+formula Wow, also: http://www.google.com/search?q=php+calculate+sunset Yields this gem: http://www.w3schools.com/php/func_date_sunset.asp Whooa. I thought

Re: [PHP] calculate the time that day ends

2009-02-03 Thread Thodoris
without burning himself. Of course Blade is an exception thrown out of the blue. STFW http://www.google.com/search?q=calculate+sunset+formula Wow, also: http://www.google.com/search?q=php+calculate+sunset Yields this gem: http://www.w3schools.com/php/func_date_sunset.asp Thanks

Re: [PHP] calculate the time that day ends

2009-02-03 Thread tedd
At 11:36 AM -0500 2/3/09, Dan Shirah wrote: Doesn't every day end at 23:59:59? the next second would be 00:00:00...the beginning of a new day! :) Splitting hairs. December 31, 2008 had two 23:59:59 -- it was a leap second for that year. My grand-kids, being the nerds that they are counted

Re: [PHP] calculate the time that day ends

2009-02-03 Thread Lupus Michaelis
Shawn McKenzie a écrit : STFW That's not so fair. If Thodoris ask about day end, it is obvious he's wrong with the word. Wrong because he isn't mastering english. So, without the good word (sunset), he can't find. So please don't bash us when we appear silly ! -- Mickaël Wolff aka

Re: [PHP] calculate a varchar

2007-12-06 Thread Richard Lynch
I won't say you CAN'T do it (you can with eval) but you'd be WAY better off to use some kind of exchange rate field that you can change frequently instead of cramming formulas into the field. If eval is the answer, you are probably doing something wrong. You may also want to store everything as

Re: [PHP] calculate a varchar

2007-12-04 Thread Zoltán Németh
2007. 12. 3, hétfő keltezéssel 15.00-kor Andrew Ballard ezt írta: On Dec 3, 2007 10:56 AM, John Taylor-Johnston [EMAIL PROTECTED] wrote: Is there a calculation function? I'm using an e-commerce shopping cart. I want to tweak the code. The author is using a varchar(100) field to store

[PHP] calculate a varchar

2007-12-03 Thread John Taylor-Johnston
Is there a calculation function? I'm using an e-commerce shopping cart. I want to tweak the code. The author is using a varchar(100) field to store prices. Taking advantage of there being a varchar, instead of entering a price, I would like to enter a calculation. (24*2.2)+(24*2.2*.1) 24

Re: [PHP] calculate a varchar

2007-12-03 Thread Daniel Brown
On Dec 3, 2007 10:56 AM, John Taylor-Johnston [EMAIL PROTECTED] wrote: Is there a calculation function? I'm using an e-commerce shopping cart. I want to tweak the code. The author is using a varchar(100) field to store prices. Taking advantage of there being a varchar, instead of entering a

Re: [PHP] calculate a varchar

2007-12-03 Thread Richard Heyes
Is there a calculation function? I'm using an e-commerce shopping cart. I want to tweak the code. The author is using a varchar(100) field to store prices. Taking advantage of there being a varchar, instead of entering a price, I would like to enter a calculation. (24*2.2)+(24*2.2*.1) 24

Re: [PHP] calculate a varchar

2007-12-03 Thread Jim Lucas
Daniel Brown wrote: On Dec 3, 2007 10:56 AM, John Taylor-Johnston [EMAIL PROTECTED] wrote: Is there a calculation function? I'm using an e-commerce shopping cart. I want to tweak the code. The author is using a varchar(100) field to store prices. Taking advantage of there being a varchar,

Re: [PHP] calculate a varchar

2007-12-03 Thread Andrew Ballard
On Dec 3, 2007 10:56 AM, John Taylor-Johnston [EMAIL PROTECTED] wrote: Is there a calculation function? I'm using an e-commerce shopping cart. I want to tweak the code. The author is using a varchar(100) field to store prices. Taking advantage of there being a varchar, instead of entering a

[PHP] calculate xml size

2007-05-26 Thread Vo, Lance
does php has any function that calculate a xml element in bytes or anything: example: tests test1ABC/test1 test2DEF/test2 /tests If I want to calculate element test1, it should return 18 bytes. thanks Lance

Re: [PHP] calculate xml size

2007-05-26 Thread Tijnema
On 5/26/07, Vo, Lance [EMAIL PROTECTED] wrote: does php has any function that calculate a xml element in bytes or anything: example: tests test1ABC/test1 test2DEF/test2 /tests If I want to calculate element test1, it should return 18 bytes. thanks Lance I have nearly no experience

[PHP] Calculate string width using some font.

2007-02-05 Thread Juan Felipe Alvarez Saldarriaga
Hey list! :) I've got a problem trying to calculate a string width using an X font with some Y font size to use in an svg-to-pdf conversion. This is what I try to do: 1. Create a dummy image. 2. Set the text there using font X and the font size Y (it seems that when I create the image it

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread Jochem Maas
Juan Felipe Alvarez Saldarriaga wrote: Hey list! :) my name's not list but what the heck: take a look at these function, they should light the way: http://php.net/manual/en/function.imageftbbox.php http://php.net/manual/en/function.imagepsbbox.php

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread Juan Felipe Alvarez Saldarriaga
Jochem Maas wrote: Juan Felipe Alvarez Saldarriaga wrote: Hey list! :) my name's not list but what the heck: take a look at these function, they should light the way: http://php.net/manual/en/function.imageftbbox.php http://php.net/manual/en/function.imagepsbbox.php

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread setcookie
pdf_stringwidth() may help you regards fra* Hey list! :) my name's not list but what the heck: take a look at these function, they should light the way: http://php.net/manual/en/function.imageftbbox.php http://php.net/manual/en/function.imagepsbbox.php

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread Juan Felipe Alvarez Saldarriaga
setcookie wrote: pdf_stringwidth() may help you regards fra* Yea I saw that too but you know, pdflib is not free. Hey list! :) my name's not list but what the heck: take a look at these function, they should light the way: http://php.net/manual/en/function.imageftbbox.php

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread tedd
At 2:54 PM -0500 2/5/07, Juan Felipe Alvarez Saldarriaga wrote: setcookie wrote: pdf_stringwidth() may help you regards fra* Yea I saw that too but you know, pdflib is not free. Yes, but there's a free version -- Google fpdf. tedd -- --- http://sperling.com http://ancientstones.com

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread Richard Lynch
On Mon, February 5, 2007 11:22 am, Juan Felipe Alvarez Saldarriaga wrote: 1. Create a dummy image. 2. Set the text there using font X and the font size Y (it seems that when I create the image it renders it at 72dpi so I need to reduce it at 300dpi) When I did a 300-dpi PDF thingie, I

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread Richard Lynch
On Mon, February 5, 2007 12:04 pm, Jochem Maas wrote: there is no dpi - your screen printer has a certain dpi and that determine how big the image displays on either. This is true, but ultimately, if you want the dang thing to print out at 300 DPI, then you want enough pixels to make that

Re: [PHP] Calculate string width using some font.

2007-02-05 Thread Richard Lynch
On Mon, February 5, 2007 1:54 pm, Juan Felipe Alvarez Saldarriaga wrote: setcookie wrote: pdf_stringwidth() may help you regards fra* Yea I saw that too but you know, pdflib is not free. Depends on your usage and if you need the PDI part or not... PDI == Smush two PDF together. --

[PHP] Calculate No Of Days

2005-01-03 Thread khuram noman
Hi Is there any function avialable in PHP to calculate the no of days by passing 2 dates like 1 argument is 1/1/2005 and the second one is 1/2/2005 then it returns the no of days or how can i do that if there is no builtin function . Regards Khuram Noman

Re: [PHP] Calculate No Of Days

2005-01-03 Thread RaTT
Hi Khuram I use this function function daysLeft($startDate,$endDate=false){ // convert to timestamps $start_stamp = strtotime($startDate); $end_stamp = ($endDate)?strtotime($endDate):time(); if($start_stamp $end_stamp){

Re: [PHP] Calculate No Of Days

2005-01-03 Thread tg-php
Greetings! I've posted this before, but there are always new readers so here's my script solution. One of these days I'll make it a function or something, but this should give you a good general idea of how to do such a thing in case you need it again in the future. btw: This also calculates

[PHP] Calculate

2004-03-16 Thread Tommi Virtanen
Hi! How I can calculate following: I have table: id(int) start_date(date)end_date(date) 001 2004-03-10 2004-03-12 002 2004-03-27 2004-04-02 003 2004-04-05 2004-04-06 Total count of date is 12. But

Re: [PHP] Calculate

2004-03-16 Thread joel boonstra
On Tue, Mar 16, 2004 at 02:35:57PM +0200, Tommi Virtanen wrote: How I can calculate following: I have table: id(int) start_date(date)end_date(date) 001 2004-03-10 2004-03-12 002 2004-03-27 2004-04-02 003

Re: [PHP] Calculate

2004-03-16 Thread Jason Davidson
joel boonstra [EMAIL PROTECTED] wrote: On Tue, Mar 16, 2004 at 02:35:57PM +0200, Tommi Virtanen wrote: How I can calculate following: I have table: id(int) start_date(date)end_date(date) 001 2004-03-10 2004-03-12 002

Re: [PHP] Calculate

2004-03-16 Thread joel boonstra
On Tue, Mar 16, 2004 at 09:43:28AM -0800, Jason Davidson wrote: Most likely im not understanding your question.. but, if you are trying to calculate the total rows by month.. SELECT whatever FROM table WHERE MONTH(your_date) = '03'; and use num_rows or row_count or whatever the php mysql

[PHP] Calculate total amount from input

2003-10-01 Thread irinchiang
Hi all, A PHP question to ask: I am using PHP to do a calculation of the total of fields where user actually input the amount into the text field and I will calculate the TOTAL from the fields as well as the GST. Wonder how should I go about doing that? I did something like :

Re: [PHP] Calculate total amount from input

2003-10-01 Thread Burhan Khalid
[EMAIL PROTECTED] wrote: Hi all, A PHP question to ask: I am using PHP to do a calculation of the total of fields where user actually input the amount into the text field and I will calculate the TOTAL from the fields as well as the GST. Wonder how should I go about doing that? I did

Re: [PHP] calculate the traffic size with php(like the apacheaccess_log)

2003-01-10 Thread Torsten Rosenberger
Hello again thank's for the fast anwser. So I trie it now with the access_log file but this file become very big (20 - 40 MB) and then i get Allowed memory size of 10485760 bytes exhausted (i can set the size in php.ini to a higher value but ..) is there a possibility to read a part

Re: [PHP] calculate the traffic size with php(like the apache

2003-01-10 Thread Jean-Christian Imbeault
I'm not sure what you are trying to do exactly (i haven't been following this thread) but if you want to analyze apache web logs try analog. It can do everything and is *blazzingly* fast. I use on log file that are 10 Gb or greater ... http://www.analog.cx Jc -- PHP General Mailing List

[PHP] calculate the traffic size with php(like the apache access_log)

2003-01-09 Thread Torsten Rosenberger
Hello Is it possible to get the transfer (traffic) size from a webpage as is stands in the apache access_log file 127.0.0.1 - - [07/Jan/2003:13:01:58 +0100] GET /~torsten/cups/pdf.php HTTP/1.1 200 48 (size) When i work with outbut buffer i only get the html source size with ob_get_length.If

Re: [PHP] calculate the traffic size with php(like the apache access_log)

2003-01-09 Thread Marek Kilimajer
Requests for images bypass php, so you need get it from apache log. Torsten Rosenberger wrote: Hello Is it possible to get the transfer (traffic) size from a webpage as is stands in the apache access_log file 127.0.0.1 - - [07/Jan/2003:13:01:58 +0100] GET /~torsten/cups/pdf.php HTTP/1.1 200

Re: [PHP] calculate bytes in string

2002-11-09 Thread Jason Wong
On Saturday 09 November 2002 14:22, Ian Newlands wrote: Does anyone know of a function, or a method to calculate how many bytes are in a string? Similar to the filesize file system function. Any help would be appreciated. Assuming 1 character = 1 byte, then strlen(). -- PHP General Mailing

Re: [PHP] calculate bytes in string

2002-11-09 Thread @ Edwin
Or, Jason Wong [EMAIL PROTECTED] wrote: On Saturday 09 November 2002 14:22, Ian Newlands wrote: Does anyone know of a function, or a method to calculate how many bytes are in a string? Similar to the filesize file system function. Any help would be appreciated. Assuming 1 character =

Re: [PHP] calculate bytes in string

2002-11-09 Thread Ian Newlands
Well I tried that, however I was saving dynamically generated .XLS files. Because I was using addslashes before hand it was reporting the wrong file size. So it was my mistake, thanks for your help! Regards, Ian Newlands Jason Wong [EMAIL PROTECTED] wrote in message

Re: [PHP] calculate bytes in string

2002-11-09 Thread Ian Newlands
This was exactly what I was trying to avoid. See I was porting a reporting module to write .XLS files to a database, rather than to files. It's easier for me to clean up old reports that way. Anyway, thanks for your help! Regards, Ian Newlands @ Edwin [EMAIL PROTECTED] wrote in message

[PHP] calculate bytes in string

2002-11-08 Thread Ian Newlands
Does anyone know of a function, or a method to calculate how many bytes are in a string? Similar to the filesize file system function. Any help would be appreciated. Regards, Ian Newlands -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Calculate Directory Size

2002-01-26 Thread Simon H
smime.p7m Description: application/pkcs7-mime

RE: [PHP] calculate download time

2001-06-29 Thread Tyrone Mills
] [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 10:42 AM To: php Subject: RE: [PHP] calculate download time simple. get total KB (1k = 1024 bytes) divide that by 60 (seconds in a minute) now you have estimated transfer time in minutes. -Original Message- From: Rhett Hermer

[PHP] calculate download time

2001-06-27 Thread Rhett Hermer
Hi, I am trying to write code to find out how long it takes to download a file. The code is below. When I compare to other websites which you can calculate online, varies wildly. I do know about many factors that affect the download times. All I want is correct forumla to caclulate. $b =

Re: [PHP] Calculate # of minutes during working hours between two dates

2001-06-21 Thread Hugh Bothwell
Yick! Three-quarters of the replies to this are not what he asked for, and the others are really scarily inefficient. Total work time = (start time to end of first week) + (end of first week to end of last week) - (end time to end of last week). This is a non-obvious way to phrase it, but it

[PHP] Calculate # of minutes during working hours between two dates

2001-06-20 Thread Wim Koorenneef
Hi all, I want to calculate the number of minutes between two dates, but only those minutes on monday through friday between 08.00 and 17.30. I could evaluate every minute in the interval against all known minutes during working hours, but that's a bit much :-) Any suggestions for a better,

Re: [PHP] Calculate # of minutes during working hours between two dates

2001-06-20 Thread Jon Rosenberg
sloppy psuedocode:(but you get the idea) numdays = date2 - date1 minperday = 60 * 9.5(hrs) totalminutes for interval = numdays * minperday - Original Message - From: Wim Koorenneef [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 20, 2001 11:25 AM Subject: [PHP] Calculate

RE: [PHP] Calculate # of minutes during working hours between two dates

2001-06-20 Thread SED
Try to find unix-time in seconds: (endtime - starttime) / 60 = total minutes SED -Original Message- From: Wim Koorenneef [mailto:[EMAIL PROTECTED]] Sent: 20. júní 2001 15:26 To: [EMAIL PROTECTED] Subject: [PHP] Calculate # of minutes during working hours between two dates Hi all, I

RE: [PHP] Calculate # of minutes during working hours between two dates

2001-06-20 Thread scott [gts]
figure out how many minutes per day, put that as a constant in your script, then just multiply that by the number of days between the two dates. ... or would you prefer something more convoluted? ;) -Original Message- From: Wim Koorenneef [mailto:[EMAIL PROTECTED]] Subject: [PHP

Re: [PHP] Calculate # of minutes during working hours between two dates

2001-06-20 Thread dcoleman
Hi See http://www.php.net/manual/en/function.jddayofweek.php For each date returning 1 through 5, add the appropriate amounts of minutes to the total HTH Wim Koorenneef wrote: Hi all, I want to calculate the number of minutes between two dates, but only those minutes on monday through

RE: [PHP] Calculate # of minutes during working hours between two dates

2001-06-20 Thread Rich Cavanaugh
Message- From: Wim Koorenneef [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 11:26 AM To: [EMAIL PROTECTED] Subject: [PHP] Calculate # of minutes during working hours between two dates Hi all, I want to calculate the number of minutes between two dates, but only those minutes on monday

RE: [PHP] Calculate # of minutes during working hours between two dates

2001-06-20 Thread Jason Murray
for? 'Faster pizza delivery.' -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 21, 2001 5:55 AM To: 'Wim Koorenneef' Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Calculate # of minutes during working hours between two dates Try to find unix-time in seconds

[PHP] calculate length between date to date

2001-04-22 Thread [EMAIL PROTECTED]
Hi all I have 2 variables here that store date start and date end, I want to compare the lenght between the start date and the end date, how would I do that? $dateStart = $year . $mon . $date ; ( for instance, it will return 20010102) $dateEnd = $yearEnd . $monEnd . $dateEnd ; ( for instance, it

RE: [PHP] calculate length between date to date

2001-04-22 Thread Jason Murray
I have 2 variables here that store date start and date end, I want to compare the lenght between the start date and the end date, how would I do that? $dateStart = $year . $mon . $date ; ( for instance, it will return 20010102) $dateEnd = $yearEnd . $monEnd . $dateEnd ; ( for instance,