 |
|
 |
|
Next: htmlentities and XMLentities
|
| Author |
Message |
External

Since: Jan 11, 2008 Posts: 799
|
(Msg. 1) Posted: Sat Dec 06, 2008 8:10 am
Post subject: Leap year? Archived from groups: comp>lang>php (more info?)
|
|
|
|
|
| Back to top |
|
 |  |
External

Since: Dec 07, 2007 Posts: 74
|
(Msg. 2) Posted: Sat Dec 06, 2008 12:31 pm
Post subject: Re: Leap year? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
|
| > until solar time is out by a half day, in which cae in a few thosuand
> yeers it will need another tweak,
lol, if everyone was this forward thinking there would have been no
Milleium bug problems. 
|
>> Stay informed about: Leap year? |
|
| Back to top |
|
 |  |
External

Since: Apr 29, 2008 Posts: 39
|
(Msg. 3) Posted: Sat Dec 06, 2008 1:25 pm
Post subject: Re: Leap year? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
jodleren schrieb:
> Is there a function to get to know whether a year is a leap year?
function isLeapYear( $year )
{
return !( $year % 4 ) && ( ( $year % 100 ) || !( $year % 400 ) );
}
A year is a leap year if it is divisible by 4 unless it is also
divisible by 100; however, years divisible by 400 are still leap years.
Greetings,
Thomas
--
Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison!
(Coluche) >> Stay informed about: Leap year? |
|
| Back to top |
|
 |  |
External

Since: Oct 21, 2007 Posts: 318
|
(Msg. 4) Posted: Sat Dec 06, 2008 2:25 pm
Post subject: Re: Leap year? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Thomas Mlynarczyk wrote:
> jodleren schrieb:
>> Is there a function to get to know whether a year is a leap year?
>
> function isLeapYear( $year )
> {
> return !( $year % 4 ) && ( ( $year % 100 ) || !( $year % 400 ) );
> }
>
> A year is a leap year if it is divisible by 4 unless it is also
> divisible by 100; however, years divisible by 400 are still leap years.
>
> Greetings,
> Thomas
>
until solar time is out by a half day, in which cae in a few thosuand
yeers it will need another tweak, >> Stay informed about: Leap year? |
|
| Back to top |
|
 |  |
External

Since: Oct 21, 2007 Posts: 318
|
(Msg. 5) Posted: Sat Dec 06, 2008 8:26 pm
Post subject: Re: Leap year? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
macca wrote:
>> until solar time is out by a half day, in which cae in a few thosuand
>> yeers it will need another tweak,
>
> lol, if everyone was this forward thinking there would have been no
> Milleium bug problems.
>
Guess what... there weren't any millenium bugs.
Not in anything Linux/Unix based which runs time in terms of IIRC a 32
bit number of seconds since Jan 1 1970. IIRC that rolls over about 2020,
by which tie it will probably be 64bit seconds instead, as all the 32
bit kit will be long gone.
The millennium bug was a total con. It basically said 'there might be
witches and demons out there' and then involved billions of man hours to
show what everybody knew, that there weren't. >> Stay informed about: Leap year? |
|
| Back to top |
|
 |  |
External

Since: Aug 11, 2004 Posts: 3779
|
(Msg. 6) Posted: Sat Dec 06, 2008 8:47 pm
Post subject: Re: Leap year? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
The Natural Philosopher wrote:
> macca wrote:
>>> until solar time is out by a half day, in which cae in a few thosuand
>>> yeers it will need another tweak,
>>
>> lol, if everyone was this forward thinking there would have been no
>> Milleium bug problems.
>>
> Guess what... there weren't any millenium bugs.
>
> Not in anything Linux/Unix based which runs time in terms of IIRC a 32
> bit number of seconds since Jan 1 1970. IIRC that rolls over about 2020,
> by which tie it will probably be 64bit seconds instead, as all the 32
> bit kit will be long gone.
>
>
> The millennium bug was a total con. It basically said 'there might be
> witches and demons out there' and then involved billions of man hours to
> show what everybody knew, that there weren't.
>
Spoken by someone who has absolutely no idea what he is talking about
(as usual).
There were millions of millennium bugs. There were no problems as a
result because of programmers (which you are NOT) who spent millions of
man hours finding and fixing the bugs. I know a lot of those who worked
16+ hour days doing just that.
But then you are famous for speaking through your ass.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex DeleteThis @attglobal.net
================== >> Stay informed about: Leap year? |
|
| Back to top |
|
 |  |
External

Since: Apr 03, 2008 Posts: 18
|
(Msg. 7) Posted: Sat Dec 06, 2008 9:25 pm
Post subject: Re: Leap year? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
The Natural Philosopher wrote:
> macca wrote:
>>> until solar time is out by a half day, in which cae in a few thosuand
>>> yeers it will need another tweak,
>>
>> lol, if everyone was this forward thinking there would have been no
>> Milleium bug problems.
>>
> Guess what... there weren't any millenium bugs.
>
> Not in anything Linux/Unix based which runs time in terms of IIRC a 32
> bit number of seconds since Jan 1 1970. IIRC that rolls over about 2020,
> by which tie it will probably be 64bit seconds instead, as all the 32
> bit kit will be long gone.
>
>
> The millennium bug was a total con. It basically said 'there might be
> witches and demons out there' and then involved billions of man hours to
> show what everybody knew, that there weren't.
It was a chance for IT departments to upgrade without the usual nonsense
of "It is working, why do you need to change anything?".
--
Jim Pennino
Remove .spam.sux to reply. >> Stay informed about: Leap year? |
|
| Back to top |
|
 |  |
External

Since: Dec 06, 2008 Posts: 1
|
(Msg. 8) Posted: Sat Dec 06, 2008 9:38 pm
Post subject: Re: Leap year? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
>>> until solar time is out by a half day, in which cae in a few thosuand
>>> yeers it will need another tweak,
>>
>> lol, if everyone was this forward thinking there would have been no
>> Milleium bug problems.
>>
>Guess what... there weren't any millenium bugs.
There were millennium bugs. One I remember was a mail transport
program (yes, UNIX based) putting the year as "100" in the Date:
header. And some other program took that date as either too far
in the future or too far in the past, and declared the message
containing that header to be SPAM, so it was a bit more of a problem
than an stupid-looking mistake in a header nobody ever looks at.
>Not in anything Linux/Unix based which runs time in terms of IIRC a 32
>bit number of seconds since Jan 1 1970. IIRC that rolls over about 2020,
No, we've got a bit longer than that, to January 2038. And if we
can treat it as unsigned, we can buy another 68 years or so. However,
if anyone is using UNIX time_t representations for the scheduled
payoff dates of 30-year mortgages, we're already in trouble.
>by which tie it will probably be 64bit seconds instead, as all the 32
>bit kit will be long gone.
Well, the 32-bit hardware may well be all gone, but I wonder about the
32-bit applications still running in legacy mode. And all the file formats
with 32-bit times in them.
>The millennium bug was a total con. It basically said 'there might be
>witches and demons out there' and then involved billions of man hours to
>show what everybody knew, that there weren't.
I don't agree. It was overhyped, but a lot of effort went into fixing
very real bugs. And right now people are writing more bugs that will
show up in 2100, because Y2K was a "non-problem". >> Stay informed about: Leap year? |
|
| Back to top |
|
 |  |
External

Since: Oct 21, 2007 Posts: 318
|
(Msg. 9) Posted: Sun Dec 07, 2008 6:25 am
Post subject: Re: Leap year? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Jerry Stuckle wrote:
> The Natural Philosopher wrote:
>> macca wrote:
>>>> until solar time is out by a half day, in which cae in a few thosuand
>>>> yeers it will need another tweak,
>>>
>>> lol, if everyone was this forward thinking there would have been no
>>> Milleium bug problems.
>>>
>> Guess what... there weren't any millenium bugs.
>>
>> Not in anything Linux/Unix based which runs time in terms of IIRC a 32
>> bit number of seconds since Jan 1 1970. IIRC that rolls over about
>> 2020, by which tie it will probably be 64bit seconds instead, as all
>> the 32 bit kit will be long gone.
>>
>>
>> The millennium bug was a total con. It basically said 'there might be
>> witches and demons out there' and then involved billions of man hours
>> to show what everybody knew, that there weren't.
>>
>
> Spoken by someone who has absolutely no idea what he is talking about
> (as usual).
>
> There were millions of millennium bugs.
we didn't find one.
There were no problems as a
> result because of programmers (which you are NOT)
I am and have been.
> who spent millions of
> man hours finding and fixing the bugs.
In our case not finding the bugs because there weren't any.
> I know a lot of those who worked
> 16+ hour days doing just that.
>
So did we.
> But then you are famous for speaking through your ass.
>
No, Jerry, that's you. >> Stay informed about: Leap year? |
|
| Back to top |
|
 |  |
External

Since: Dec 10, 2007 Posts: 95
|
(Msg. 10) Posted: Sun Dec 07, 2008 7:25 am
Post subject: Re: Leap year? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"The Natural Philosopher" wrote in message
> Jerry Stuckle wrote:
>> The Natural Philosopher wrote:
>>> macca wrote:
>>>>> until solar time is out by a half day, in which cae in a few thosuand
>>>>> yeers it will need another tweak,
>>>>
>>>> lol, if everyone was this forward thinking there would have been no
>>>> Milleium bug problems.
>>>>
>>> Guess what... there weren't any millenium bugs.
>>>
>>> Not in anything Linux/Unix based which runs time in terms of IIRC a 32
>>> bit number of seconds since Jan 1 1970. IIRC that rolls over about 2020,
>>> by which tie it will probably be 64bit seconds instead, as all the 32
>>> bit kit will be long gone.
>>>
>>>
>>> The millennium bug was a total con. It basically said 'there might be
>>> witches and demons out there' and then involved billions of man hours to
>>> show what everybody knew, that there weren't.
>>>
>>
>> Spoken by someone who has absolutely no idea what he is talking about (as
>> usual).
>>
>> There were millions of millennium bugs.
>
> we didn't find one.
So you were not working in an industry where the millennium bugs were. What
were you doing then? Driving a truck like Richard? >> Stay informed about: Leap year? |
|
| Back to top |
|
 |  |
External

Since: Feb 10, 2008 Posts: 45
|
(Msg. 11) Posted: Sun Dec 07, 2008 7:25 am
Post subject: Re: Leap year? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Jerry Stuckle wrote:
>
> There were millions of millennium bugs. There were no problems as a
> result because of programmers (which you are NOT) who spent millions of
> man hours finding and fixing the bugs. I know a lot of those who worked
> 16+ hour days doing just that.
>
Surely there must have been lots of code for which the source had been
lost or which was never identified, yet nothing really happened. >> Stay informed about: Leap year? |
|
| Back to top |
|
 |  |
External

Since: Aug 11, 2004 Posts: 3779
|
(Msg. 12) Posted: Sun Dec 07, 2008 7:33 am
Post subject: Re: Leap year? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
The Natural Philosopher wrote:
> Jerry Stuckle wrote:
>> The Natural Philosopher wrote:
>>> macca wrote:
>>>>> until solar time is out by a half day, in which cae in a few thosuand
>>>>> yeers it will need another tweak,
>>>>
>>>> lol, if everyone was this forward thinking there would have been no
>>>> Milleium bug problems.
>>>>
>>> Guess what... there weren't any millenium bugs.
>>>
>>> Not in anything Linux/Unix based which runs time in terms of IIRC a
>>> 32 bit number of seconds since Jan 1 1970. IIRC that rolls over about
>>> 2020, by which tie it will probably be 64bit seconds instead, as all
>>> the 32 bit kit will be long gone.
>>>
>>>
>>> The millennium bug was a total con. It basically said 'there might be
>>> witches and demons out there' and then involved billions of man hours
>>> to show what everybody knew, that there weren't.
>>>
>>
>> Spoken by someone who has absolutely no idea what he is talking about
>> (as usual).
>>
>> There were millions of millennium bugs.
>
> we didn't find one.
>
>
That YOU know of, anyway. But you don't know about the rest of the world.
> There were no problems as a
>> result because of programmers (which you are NOT)
>
> I am and have been.
>
ROFLAMO! I've seen more competence from people right out of their first
(1 week) programming class.
>> who spent millions of man hours finding and fixing the bugs.
>
> In our case not finding the bugs because there weren't any.
>
Not as far as YOU know. And you can't say that for the rest of the world.
>> I know a lot of those who worked 16+ hour days doing just that.
>>
> So did we.
>
Seems like either you or your management is even more incompetent than I
previously thought. Spending 16 hours a day working on something which
doesn't exist! ROFLMAO!
My bet is your management is competent.
>> But then you are famous for speaking through your ass.
>>
> No, Jerry, that's you.
ROFLMAO! I have yet to see you give ANY good advice in this or any
other newsgroup. But then that's what I would expect, because your last
post is very typical of all of your posts here (and in other programming
newsgroups).
You're afraid to use your real name - your management might find out how
incompetent you really are.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex DeleteThis @attglobal.net
================== >> Stay informed about: Leap year? |
|
| Back to top |
|
 |  |
External

Since: Aug 11, 2004 Posts: 3779
|
(Msg. 13) Posted: Sun Dec 07, 2008 7:40 am
Post subject: Re: Leap year? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Hugh Oxford wrote:
> Jerry Stuckle wrote:
>
>>
>> There were millions of millennium bugs. There were no problems as a
>> result because of programmers (which you are NOT) who spent millions
>> of man hours finding and fixing the bugs. I know a lot of those who
>> worked 16+ hour days doing just that.
>>
>
>
>
> Surely there must have been lots of code for which the source had been
> lost or which was never identified, yet nothing really happened.
Not in most companies. If they didn't have the source, they had to
rewrite the program from scratch.
But that's quite unlikely. Larger companies (unlike one-man shops)
archive EVERYTHING, because you don't know when you will need to modify
it. I know of companies which still have AUTOCODER code in storage -
even though it hasn't been available for decades.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex.TakeThisOut@attglobal.net
================== >> Stay informed about: Leap year? |
|
| Back to top |
|
 |  |
External

Since: Oct 21, 2007 Posts: 318
|
(Msg. 14) Posted: Sun Dec 07, 2008 8:25 am
Post subject: Re: Leap year? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Hugh Oxford wrote:
> Jerry Stuckle wrote:
>
>>
>> There were millions of millennium bugs. There were no problems as a
>> result because of programmers (which you are NOT) who spent millions
>> of man hours finding and fixing the bugs. I know a lot of those who
>> worked 16+ hour days doing just that.
>>
>
>
>
> Surely there must have been lots of code for which the source had been
> lost or which was never identified, yet nothing really happened.
Exactly.
The cost to the users(reflected in the profits of the companies who
charged to check the code) was enormous, and the few instances found
were trivial. We didn't find a single one, and I don't know of anyone
else who did.
But I do remember a girlfriend back in the early 80's remarking 'this
software I am working on will fall over in 2000' Written in BASIC to run
on CP/M machines. Yeah. That's a really popular platform these days
isn't it?
Everything in C or C++ would almost certainly use the C library
functions for date and time, and those are largely based on the UNIX
standard, as is MSDOS/windows and so on. That rolls over in 2038,
according to another poster. That could well be more of an issue.
But I doubt I shall be alive then, so who cares? >> Stay informed about: Leap year? |
|
| Back to top |
|
 |  |
External

Since: Oct 21, 2007 Posts: 318
|
(Msg. 15) Posted: Sun Dec 07, 2008 8:25 am
Post subject: Re: Leap year? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Jerry Stuckle wrote:
> The Natural Philosopher wrote:
>> Jerry Stuckle wrote:
>>> The Natural Philosopher wrote:
>>>> macca wrote:
>>>>>> until solar time is out by a half day, in which cae in a few thosuand
>>>>>> yeers it will need another tweak,
>>>>>
>>>>> lol, if everyone was this forward thinking there would have been no
>>>>> Milleium bug problems.
>>>>>
>>>> Guess what... there weren't any millenium bugs.
>>>>
>>>> Not in anything Linux/Unix based which runs time in terms of IIRC a
>>>> 32 bit number of seconds since Jan 1 1970. IIRC that rolls over
>>>> about 2020, by which tie it will probably be 64bit seconds instead,
>>>> as all the 32 bit kit will be long gone.
>>>>
>>>>
>>>> The millennium bug was a total con. It basically said 'there might
>>>> be witches and demons out there' and then involved billions of man
>>>> hours to show what everybody knew, that there weren't.
>>>>
>>>
>>> Spoken by someone who has absolutely no idea what he is talking about
>>> (as usual).
>>>
>>> There were millions of millennium bugs.
>>
>> we didn't find one.
>>
>>
>
> That YOU know of, anyway. But you don't know about the rest of the world.
>
>> There were no problems as a
>>> result because of programmers (which you are NOT)
>>
>> I am and have been.
>>
>
> ROFLAMO! I've seen more competence from people right out of their first
> (1 week) programming class.
>
>>> who spent millions of man hours finding and fixing the bugs.
>>
>> In our case not finding the bugs because there weren't any.
>>
>
> Not as far as YOU know. And you can't say that for the rest of the world.
>
>>> I know a lot of those who worked 16+ hour days doing just that.
>>>
>> So did we.
>>
>
> Seems like either you or your management is even more incompetent than I
> previously thought. Spending 16 hours a day working on something which
> doesn't exist! ROFLMAO!
>
> My bet is your management is competent.
>
>>> But then you are famous for speaking through your ass.
>>>
>> No, Jerry, that's you.
>
> ROFLMAO! I have yet to see you give ANY good advice in this or any
> other newsgroup. But then that's what I would expect, because your last
> post is very typical of all of your posts here (and in other programming
> newsgroups).
>
> You're afraid to use your real name - your management might find out how
> incompetent you really are.
>
Jerry dear boy. I *was* the management of a 70+ person company.
Prior to that I was writing software professionally for 10 years.
Prior to that I was an electronics circuit designer for 12 years..
I know you don't like me, because I show you up almost every time you
open your arse to talk, but that doesn't change the facts.
Whether or not you think I was competent is a small issue to set against
the people who paid me, and then my company, for stuff that actually
worked, reliably in high stress situations.
And paid enough for my company to enable me to retire at 50, and devote
my time to what I wanted to do, which latterly has been developing
another commercial application. Sure I am new to php, but so what? its
just another quirky language to make do what I want.
After I built my own house. Which was another piece of engineering
design, that seems so far to not have fallen down.
Unlike most of your pompous assertions. >> Stay informed about: Leap year? |
|
| Back to top |
|
 |  |
| Related Topics: | Big leap - using web services - I'm ready to take a big leap forward. Where can I read up on using Web Services with PHP? What I want to do is to write a simple application using the Prosper API (http://www.prosper.com/tools/) to extract some data from that platform. Thanks.
year in a (****) format - (1950) (1975) (2000) (2001) etc etc This sort of year will be somewhere in a one line string . (****) How do i search for a year like this thats between 2 curved brackets . While i could use strpos to find the first curved bracket then then check....
Last Day of Year Date Bug? - Guys, the line below just returned "Dec 07" as the date for one month back from today. Hardly life-threatening, but any thoughts? <?php print date("M `y", mktime(0, 0, 0, date("m")-1, date("d"), date("Y&q...
day of the year to date/timestamp - Hello comunity, is there any way in order to convert or to have a date from 1.the day of the year (the consecutive) and 2.the year i need to get the whole date having theses data... and i haven't found the solution... anybody has an idea? thank you..
14 year guy takes on Myspace with jus php - 14 year guy takes on Myspace with php http://www.uncov.com/2007/5/10/web-2-0-so-easy-a-14-year-old-can-do-it |
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
 |
|
|