Bug of the Day
-
I'm trying to set a value to the maximum smalldatetime allowed in SQL, yet what's appearing is "6 June 1979". Nothing I do seems to work: ensuring Culture is OK, ensuring I'm passing dates around in a sensible format, ensuring the data I'm setting is the actual date I'm setting. In the debugger I see
_date
with a value of "6/06/2079 12:00:00 AM" (see rant below). The date is fine. I pass this into a formatter to turn it into "dd-MMM-yy" format. That works perfectly and the output is correct. This string goes to the user, they hit submit, it comes back and is parsed fine. Everything works perfectly. Except the date always comes back as 1979. ARGH. And then I spot it. 15 years too late I've been hit by the Y2K bug. 6/06/2079 12:00:00 AM is 6 Jun 2079 -> "6-Jun-79" which is parsed as 6-Jun-1979. /more coffee, then better formatting. As a side note: The American date format (mm/dd/yyyy) is painfully and dangerously ambiguous so given that OS installs are often set with US as the region, surely debuggers should display dates and times as dd-MMM-yyyy or even better, yyyy-mm-dd to account for the Rest Of The World who wants to scream everytime they get an email saying "the date is 4/7/2015".cheers Chris Maunder
-
I'm trying to set a value to the maximum smalldatetime allowed in SQL, yet what's appearing is "6 June 1979". Nothing I do seems to work: ensuring Culture is OK, ensuring I'm passing dates around in a sensible format, ensuring the data I'm setting is the actual date I'm setting. In the debugger I see
_date
with a value of "6/06/2079 12:00:00 AM" (see rant below). The date is fine. I pass this into a formatter to turn it into "dd-MMM-yy" format. That works perfectly and the output is correct. This string goes to the user, they hit submit, it comes back and is parsed fine. Everything works perfectly. Except the date always comes back as 1979. ARGH. And then I spot it. 15 years too late I've been hit by the Y2K bug. 6/06/2079 12:00:00 AM is 6 Jun 2079 -> "6-Jun-79" which is parsed as 6-Jun-1979. /more coffee, then better formatting. As a side note: The American date format (mm/dd/yyyy) is painfully and dangerously ambiguous so given that OS installs are often set with US as the region, surely debuggers should display dates and times as dd-MMM-yyyy or even better, yyyy-mm-dd to account for the Rest Of The World who wants to scream everytime they get an email saying "the date is 4/7/2015".cheers Chris Maunder
The American date format of MM/DD/YYYY is simply idiotic, as is our ridiculous clinging to Imperial measurements, when the metric system makes so much more sense. Why? I believe we Americans are just too lazy to adapt to a new system, despite the fact that it just makes sense to do so! OK, I have my coat and am long gone! ;P
How do we preserve the wisdom men will need, when their violent passions are spent? - The Lost Horizon
-
The American date format of MM/DD/YYYY is simply idiotic, as is our ridiculous clinging to Imperial measurements, when the metric system makes so much more sense. Why? I believe we Americans are just too lazy to adapt to a new system, despite the fact that it just makes sense to do so! OK, I have my coat and am long gone! ;P
How do we preserve the wisdom men will need, when their violent passions are spent? - The Lost Horizon
How does the metric system make more sense? It's no less arbitrary and the assumption that people will find the arithmetic less difficult is highly doubtful (shortly after we decimalised currency in the UK I was delayed by several minutes in a shop because the assistant needed to fetch a calculator to work out a 10% discount!) The imperial weights fit particularly well with the quantities of things that people might want to buy - I know exactly what I'm getting in a quarter of mushrooms, an ounce of yeast or a pound of mince and so that's what I continue to ask for despite the EU's attempts to homogenise us all with baffling amounts. Long live the pound, the pint and the mile, I say. And to return the date. It is of course the departure from the Imperial norm made by Americans (when and why I have yet to discover) that causes all the problems. Who else could come up with a system that takes a unit from its rightful place in between the lower and the higher and sticks it at the front? You don't do mm:hh:ss so why MM:dd:yy Bewildering!
-
How does the metric system make more sense? It's no less arbitrary and the assumption that people will find the arithmetic less difficult is highly doubtful (shortly after we decimalised currency in the UK I was delayed by several minutes in a shop because the assistant needed to fetch a calculator to work out a 10% discount!) The imperial weights fit particularly well with the quantities of things that people might want to buy - I know exactly what I'm getting in a quarter of mushrooms, an ounce of yeast or a pound of mince and so that's what I continue to ask for despite the EU's attempts to homogenise us all with baffling amounts. Long live the pound, the pint and the mile, I say. And to return the date. It is of course the departure from the Imperial norm made by Americans (when and why I have yet to discover) that causes all the problems. Who else could come up with a system that takes a unit from its rightful place in between the lower and the higher and sticks it at the front? You don't do mm:hh:ss so why MM:dd:yy Bewildering!
I believe the US Navy uses dd/MM/yyyy. Of course, the correct usage should be yyyyMMdd. No ambiguity there at all. Long live Imperial! :-)
-
The American date format of MM/DD/YYYY is simply idiotic, as is our ridiculous clinging to Imperial measurements, when the metric system makes so much more sense. Why? I believe we Americans are just too lazy to adapt to a new system, despite the fact that it just makes sense to do so! OK, I have my coat and am long gone! ;P
How do we preserve the wisdom men will need, when their violent passions are spent? - The Lost Horizon
As far as date is concerned, I prefer the "July 22, 2015" format. There is no room for ambiguity. However, when it comes to Imperial v. Metric. I am strictly in the Metric for science, Imperial for every day use camp. For instance, I have an intuition for how far a mile is, or how much a 50lb bag of sand weighs, but I have no clue how far a kilometer is or how much a 50kg bag of sand might weigh. Yes, I know what the conversion factors are, but I have to think about it, then convert to Imperial, just so I can be in the right ballpark. You could say, "Oh, well to Hell with current adults, we should do it for the children." But that creates a problem, because then you have two generations, who are in close proximity (parent/child relationships), using two different systems, and if the Common Core Math standards have taught us anything, it's that parents get really pissed when they're too stubborn and/or stupid to learn how to do their children's math homework.
The United States invariably does the right thing, after having exhausted every other alternative. -Winston Churchill America is the only country that went from barbarism to decadence without civilization in between. -Oscar Wilde Wow, even the French showed a little more spine than that before they got their sh*t pushed in.[^] -Colin Mullikin
-
The American date format of MM/DD/YYYY is simply idiotic, as is our ridiculous clinging to Imperial measurements, when the metric system makes so much more sense. Why? I believe we Americans are just too lazy to adapt to a new system, despite the fact that it just makes sense to do so! OK, I have my coat and am long gone! ;P
How do we preserve the wisdom men will need, when their violent passions are spent? - The Lost Horizon
-
How does the metric system make more sense? It's no less arbitrary and the assumption that people will find the arithmetic less difficult is highly doubtful (shortly after we decimalised currency in the UK I was delayed by several minutes in a shop because the assistant needed to fetch a calculator to work out a 10% discount!) The imperial weights fit particularly well with the quantities of things that people might want to buy - I know exactly what I'm getting in a quarter of mushrooms, an ounce of yeast or a pound of mince and so that's what I continue to ask for despite the EU's attempts to homogenise us all with baffling amounts. Long live the pound, the pint and the mile, I say. And to return the date. It is of course the departure from the Imperial norm made by Americans (when and why I have yet to discover) that causes all the problems. Who else could come up with a system that takes a unit from its rightful place in between the lower and the higher and sticks it at the front? You don't do mm:hh:ss so why MM:dd:yy Bewildering!
-
I'm trying to set a value to the maximum smalldatetime allowed in SQL, yet what's appearing is "6 June 1979". Nothing I do seems to work: ensuring Culture is OK, ensuring I'm passing dates around in a sensible format, ensuring the data I'm setting is the actual date I'm setting. In the debugger I see
_date
with a value of "6/06/2079 12:00:00 AM" (see rant below). The date is fine. I pass this into a formatter to turn it into "dd-MMM-yy" format. That works perfectly and the output is correct. This string goes to the user, they hit submit, it comes back and is parsed fine. Everything works perfectly. Except the date always comes back as 1979. ARGH. And then I spot it. 15 years too late I've been hit by the Y2K bug. 6/06/2079 12:00:00 AM is 6 Jun 2079 -> "6-Jun-79" which is parsed as 6-Jun-1979. /more coffee, then better formatting. As a side note: The American date format (mm/dd/yyyy) is painfully and dangerously ambiguous so given that OS installs are often set with US as the region, surely debuggers should display dates and times as dd-MMM-yyyy or even better, yyyy-mm-dd to account for the Rest Of The World who wants to scream everytime they get an email saying "the date is 4/7/2015".cheers Chris Maunder
Or at least should provide a separate option of,
IsAfterY2K
to make it clear as to which one to use. ;-) I also am of view that dates should be in format, "date/month/year" and I try to use full year notation, 2015 instead of short form of 15 or 15' etc. Helps me everytime. :-) Anyways, title should be "Bug of the Y2K"! :laugh: There is a pun in it. ;)The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
-
I believe the US Navy uses dd/MM/yyyy. Of course, the correct usage should be yyyyMMdd. No ambiguity there at all. Long live Imperial! :-)
True, and year should be yyyy, not yy only. :)
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
-
The American date format of MM/DD/YYYY is simply idiotic, as is our ridiculous clinging to Imperial measurements, when the metric system makes so much more sense. Why? I believe we Americans are just too lazy to adapt to a new system, despite the fact that it just makes sense to do so! OK, I have my coat and am long gone! ;P
How do we preserve the wisdom men will need, when their violent passions are spent? - The Lost Horizon
-
How does the metric system make more sense? It's no less arbitrary and the assumption that people will find the arithmetic less difficult is highly doubtful (shortly after we decimalised currency in the UK I was delayed by several minutes in a shop because the assistant needed to fetch a calculator to work out a 10% discount!) The imperial weights fit particularly well with the quantities of things that people might want to buy - I know exactly what I'm getting in a quarter of mushrooms, an ounce of yeast or a pound of mince and so that's what I continue to ask for despite the EU's attempts to homogenise us all with baffling amounts. Long live the pound, the pint and the mile, I say. And to return the date. It is of course the departure from the Imperial norm made by Americans (when and why I have yet to discover) that causes all the problems. Who else could come up with a system that takes a unit from its rightful place in between the lower and the higher and sticks it at the front? You don't do mm:hh:ss so why MM:dd:yy Bewildering!
I lived through the transition from the imperial system to the metric system in South Africa so I do have some experience in both systems. As far as I am concerned there is no choice: Metric is head and shoulders better than imperial! I also experienced the transition of the monetary system from pounds/shillings/pence to the current metric equivalent in SA and the UK. In SA the transition was overnight. Pounds were withdrawn from circulation in a matter of days. In the UK it took months as they chose to run a dual system for months. Very painful! Nobody will ever convince me that imperial is better!
How do we preserve the wisdom men will need, when their violent passions are spent? - The Lost Horizon
-
Americans are adopting the metric system... inch by inch! ;P
Contrary to popular belief, nobody owes you anything.
-
Neither imperial nor metrics system makes sense. Check the very basic physics for this ;)
-
I'm trying to set a value to the maximum smalldatetime allowed in SQL, yet what's appearing is "6 June 1979". Nothing I do seems to work: ensuring Culture is OK, ensuring I'm passing dates around in a sensible format, ensuring the data I'm setting is the actual date I'm setting. In the debugger I see
_date
with a value of "6/06/2079 12:00:00 AM" (see rant below). The date is fine. I pass this into a formatter to turn it into "dd-MMM-yy" format. That works perfectly and the output is correct. This string goes to the user, they hit submit, it comes back and is parsed fine. Everything works perfectly. Except the date always comes back as 1979. ARGH. And then I spot it. 15 years too late I've been hit by the Y2K bug. 6/06/2079 12:00:00 AM is 6 Jun 2079 -> "6-Jun-79" which is parsed as 6-Jun-1979. /more coffee, then better formatting. As a side note: The American date format (mm/dd/yyyy) is painfully and dangerously ambiguous so given that OS installs are often set with US as the region, surely debuggers should display dates and times as dd-MMM-yyyy or even better, yyyy-mm-dd to account for the Rest Of The World who wants to scream everytime they get an email saying "the date is 4/7/2015".cheers Chris Maunder
Grew up with the imperial system, in grade 7 or so when metric was introduced, so I've used both. For dates? I write out the date, as in July 22, 2015 - no ambiguity. This is probably the format that gave rise to mm/dd/yy.
-
I lived through the transition from the imperial system to the metric system in South Africa so I do have some experience in both systems. As far as I am concerned there is no choice: Metric is head and shoulders better than imperial! I also experienced the transition of the monetary system from pounds/shillings/pence to the current metric equivalent in SA and the UK. In SA the transition was overnight. Pounds were withdrawn from circulation in a matter of days. In the UK it took months as they chose to run a dual system for months. Very painful! Nobody will ever convince me that imperial is better!
How do we preserve the wisdom men will need, when their violent passions are spent? - The Lost Horizon
Cornelius Henning wrote:
I lived through the transition from the imperial system to the metric system in South Africa so I do have some experience in both systems. As far as I am concerned there is no choice: Metric is head and shoulders better than imperial!
I likewise lived through the transition in Canada, and agree that metric is better than Imperial or US. One exception though: the country was surveyed in chains, yards, feet and inches, and changing "travelling" distances to metric was a bad idea. Anything that was in round numbers when surveyed, bought or sold is now in fractional units (meters, hectares, ...) and this is nothing less than a mess.
I'm retired. There's a nap for that... - Harvey
-
Neither imperial nor metrics system makes sense. Check the very basic physics for this ;)
0x01AA wrote:
Check the very basic physics for this
Yup. We should measure speeds in fractions of the speed of light, time as a multiple of a basic physical frequency, and distance at the distance travelled by light in a time unit. Come to think of it, that's how the meter and second are defined!
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill
-
How does the metric system make more sense? It's no less arbitrary and the assumption that people will find the arithmetic less difficult is highly doubtful (shortly after we decimalised currency in the UK I was delayed by several minutes in a shop because the assistant needed to fetch a calculator to work out a 10% discount!) The imperial weights fit particularly well with the quantities of things that people might want to buy - I know exactly what I'm getting in a quarter of mushrooms, an ounce of yeast or a pound of mince and so that's what I continue to ask for despite the EU's attempts to homogenise us all with baffling amounts. Long live the pound, the pint and the mile, I say. And to return the date. It is of course the departure from the Imperial norm made by Americans (when and why I have yet to discover) that causes all the problems. Who else could come up with a system that takes a unit from its rightful place in between the lower and the higher and sticks it at the front? You don't do mm:hh:ss so why MM:dd:yy Bewildering!
I think the reason it was done is plain - Americans (and some others) tend to say When speaking it is rare to include the Year It is sensible to speak the largest part first So - June 5th narrows down the target as it is spoken - ideal! So Yanks take that as 6/5 Then slam the date on the wrong end because it seems less important to them. Idiotic - but then so is belief that the constitution means you can own an arsenal many a small country would be proud to own...
PooperPig - Coming Soon
-
As far as date is concerned, I prefer the "July 22, 2015" format. There is no room for ambiguity. However, when it comes to Imperial v. Metric. I am strictly in the Metric for science, Imperial for every day use camp. For instance, I have an intuition for how far a mile is, or how much a 50lb bag of sand weighs, but I have no clue how far a kilometer is or how much a 50kg bag of sand might weigh. Yes, I know what the conversion factors are, but I have to think about it, then convert to Imperial, just so I can be in the right ballpark. You could say, "Oh, well to Hell with current adults, we should do it for the children." But that creates a problem, because then you have two generations, who are in close proximity (parent/child relationships), using two different systems, and if the Common Core Math standards have taught us anything, it's that parents get really pissed when they're too stubborn and/or stupid to learn how to do their children's math homework.
The United States invariably does the right thing, after having exhausted every other alternative. -Winston Churchill America is the only country that went from barbarism to decadence without civilization in between. -Oscar Wilde Wow, even the French showed a little more spine than that before they got their sh*t pushed in.[^] -Colin Mullikin
it's a narrowing thing. It is (in principal) better to start with the biggest entity and narrow it down, than to start with an arbitrary portion. Like with addresses (which are almost universally written in exactly the opposite way) England > West Midlands > Sutton Coldfield > Four Oaks > Kenilworth Close > 2 2015 > July > 22nd The only reason for using July 22nd, 1988 would be if generally the dates you are looking at are for the same year, and so the year portion is of less import. So it depends on the use -case
PooperPig - Coming Soon
-
I'm trying to set a value to the maximum smalldatetime allowed in SQL, yet what's appearing is "6 June 1979". Nothing I do seems to work: ensuring Culture is OK, ensuring I'm passing dates around in a sensible format, ensuring the data I'm setting is the actual date I'm setting. In the debugger I see
_date
with a value of "6/06/2079 12:00:00 AM" (see rant below). The date is fine. I pass this into a formatter to turn it into "dd-MMM-yy" format. That works perfectly and the output is correct. This string goes to the user, they hit submit, it comes back and is parsed fine. Everything works perfectly. Except the date always comes back as 1979. ARGH. And then I spot it. 15 years too late I've been hit by the Y2K bug. 6/06/2079 12:00:00 AM is 6 Jun 2079 -> "6-Jun-79" which is parsed as 6-Jun-1979. /more coffee, then better formatting. As a side note: The American date format (mm/dd/yyyy) is painfully and dangerously ambiguous so given that OS installs are often set with US as the region, surely debuggers should display dates and times as dd-MMM-yyyy or even better, yyyy-mm-dd to account for the Rest Of The World who wants to scream everytime they get an email saying "the date is 4/7/2015".cheers Chris Maunder
-
How does the metric system make more sense? It's no less arbitrary and the assumption that people will find the arithmetic less difficult is highly doubtful (shortly after we decimalised currency in the UK I was delayed by several minutes in a shop because the assistant needed to fetch a calculator to work out a 10% discount!) The imperial weights fit particularly well with the quantities of things that people might want to buy - I know exactly what I'm getting in a quarter of mushrooms, an ounce of yeast or a pound of mince and so that's what I continue to ask for despite the EU's attempts to homogenise us all with baffling amounts. Long live the pound, the pint and the mile, I say. And to return the date. It is of course the departure from the Imperial norm made by Americans (when and why I have yet to discover) that causes all the problems. Who else could come up with a system that takes a unit from its rightful place in between the lower and the higher and sticks it at the front? You don't do mm:hh:ss so why MM:dd:yy Bewildering!