|
Hi Bill!
Since I am trying to stir in my careless soul some traces of interest for Contracts..
I am very far away from spending money on it!
|
|
|
|
|
I doubt your soul is "careless," and I bet you do have a concern for validation ... which is what this is all about for we mere mortals who have ... errors ... to deal with
cheers, Bill
«In art as in science there is no delight without the detail ... Let me repeat that unless these are thoroughly understood and remembered, all “general ideas” (so easily acquired, so profitably resold) must necessarily remain but worn passports allowing their bearers short cuts from one area of ignorance to another.» Vladimir Nabokov, commentary on translation of “Eugene Onegin.”
|
|
|
|
|
Trying to discover what CodeContracts (from MS) can and cannot do when the 'static compile option is set is not easy: [^].
«In art as in science there is no delight without the detail ... Let me repeat that unless these are thoroughly understood and remembered, all “general ideas” (so easily acquired, so profitably resold) must necessarily remain but worn passports allowing their bearers short cuts from one area of ignorance to another.» Vladimir Nabokov, commentary on translation of “Eugene Onegin.”
|
|
|
|
|
I'm not used to AM/PM notation in time and tried to understand when 27th, February 12PM is in Israel...
One says 12PM is midnight at the END of the day, while other says it is midday...
So between EST and IST there are 7 hours...does it mean that 12PM is 19:00 or 7:00 of the next day?
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Kornfeld Eliyahu Peter wrote: 12PM 12PM is always noon in the US, or midday. 12 AM is midnight. I've never heard of people refer to it backwards but perhaps some places do.
So, 12:00 PM EST is 7:00 PM in Israel.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
|
RyanDev wrote: 12PM is always noon in the US everywhere
FTFY
If it's not broken, fix it until it is
|
|
|
|
|
RyanDev wrote: I've never heard of people refer to it backwards but perhaps some places do.
Children sometimes do this. I know I did. When you have a limited understanding of time, you tend to think of AM as "Day" and PM as "Night" (obviously it isn't so cut and dry.) Thus, noon becomes AM, and midnight is PM!
|
|
|
|
|
If you're used to using 24 hour time, AM is 0:00 to 11:59 and PM is from 12:00 to 23:59. When thinking time differences, to the east is ahead, so add hours, to the west is behind, so subtract hours. But even that is confusing depending on what point on the globe you are making the comparison from.
if (Object.DividedByZero == true) { Universe.Implode(); }
|
|
|
|
|
Thank you!
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
And if you are on the International Date Line it's tomorrow or yesterday, depending which way you are facing.
|
|
|
|
|
To supplement what others have said:
AM and PM are derived from latin. AM being Ante Meridiem or before mid-day, and PM being Post Meridiem or after mid-day.
If you take that 12:00 midnight is considered the first minute of the day, that makes midnight 12AM, as it is occurring before mid-day. 12:00 noon therefore must be the opposite, so it is 12PM. (Mid-day itself is technically the instant between 11:59:59AM and 12:00:00PM, and doesn't have an actual specific time value.)
Hope that helps clear things up.
|
|
|
|
|
Kyle Moyer wrote: If you take that 12:00 midnight is considered the first minute of the day, that makes midnight 12AM
Doesn't make sense to me: why am I supposed to assume that 12 indicates the first hour of the day? Why not call it 0:00 AM? Think about it: 10 AM is the 11th hour of the morning, 11 AM is the 12th hour, so a consistent interpretation of 12 AM would be the 13th hour. Likewise, 2 AM is the third hour, 1 AM the second, so a consistent naming scheme would call the first hour 0 AM.
Unfortunately that is not how AM/PM works.
The truth is that the numerical and the AM/PM part are referring to different time ranges, and that is what is causing the confusion. It becomes clearer when you visualize the actual time intervals of the 12h clock alongside the 24h clock and the AM/PM indicator range:
hour: 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
24h: |<--------------------------------------------------------------------->|
12h(1): |<---------------------------------->|
12h(2): -->| |<-------------------------------
AM: |<---------------AM---------------->|
PM: |<---------------PM---------------->|
There is a 1 hour offset between the frames of reference for the numerical part and the AM/PM indicator. It doesn't make sense however you try to explain it, but as long as you keep that image in your mind you should be able to correctly interpret an AM/PM time reference.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
Stefan_Lang wrote: Doesn't make sense to me: why am I supposed to assume that 12 indicates the first hour of the day? Why not call it 0:00 AM?
For consistency. Both the 24 hour clock and the 12 hour clock tell you how much time has passed since some event. So at 1:00AM, one hour has passed since the day began. If you split the day in half to make a clock easier to read, then you get 12 hours per half. So this means mid-day occurs once 12 hours have elapsed since the day began. You call that 12:00, and then start counting again. Since a 12 hour clock doesn't have a 13 on it, 13 hours past the start of the day is 1:00PM, or 1 hour past mid-day. Once you reach midnight again, you have 12 hours since mid-day, so you start over just the same. You could use 0:00AM and 0:00PM, but all natural counting systems start at 1, so zero is skipped.
Stefan_Lang wrote: Think about it: 10 AM is the 11th hour of the morning, 11 AM is the 12th hour, so a consistent interpretation of 12 AM would be the 13th hour.
10:00AM is the beginning of the eleventh hour of the day, but 11 hours have not elapsed. The clock measures elapsed time.
Stefan_Lang wrote: so a consistent naming scheme would call the first hour 0 AM.
I agree that it should be consistent. But since we are measuring elapsed time, it is more natural to say that 12 hours have elapsed since mid-day or mid-night, than it is to say zero hours have. Natural counting systems start at 1 for a reason; if there is zero of something, you have no reason to count it at all.
The reason that 0:00 is used for the 24 hour system is much the same as why 12:00 is used for the 12 hour system. You're still counting elapsed time since an event, but here everything is relative to start of the day. So saying 24:00 (AM) is 24 hours elapsed since yesterday make you look rather foolish. Of course 24 hours have elapsed since yesterday, one day has 24 hours!
Your diagram also over generalizes things, and makes it look like mid-day is both AM and PM. It isn't. Mid-day isn't even a time (on a clock, it has no numbers.) It's an instantaneous event that occurs once half of the time in the day has elapsed. 12 hours. This occurs in the moment between 11:59:59(.999...)AM and 12:00:00PM. So really you need a different diagram for AM/PM, and should look like this:
Time: 0:00:00 -------------------- 11:59:59 !Mid-Day! 12:00:00 ------------------- 23:59:59
AM: |<---------------AM---------------->|
PM: |<---------------PM---------------->|
Stefan_Lang wrote: It doesn't make sense however you try to explain it
It makes perfect sense to me. You just have to understand that the clock is measuring elapsed time, and that humans don't start naturally counting at zero.
|
|
|
|
|
Kyle Moyer wrote: 10:00AM is the beginning of the eleventh hour of the day, but 11 hours have not elapsed. The clock measures elapsed time.
Yup. I have considered that. That makes perfect sense: in the 24h clock, "01:00" means "1 hour elapsed since the start of the day", so does it in the 12h clock notation.
But, unfortunately, it breaks down during the first hour after mid-night and mid-day: "00:43" does mean "43 minutes elapsed since the start of the day" in the 24h clock notation - the 12h clock expresses this time as "12:43 AM" though.
You can interpret this as "12h and 43m elapsed since mid-day of the previous day", but 'AM' means "this is a time before mid-day of the current day". So, the notation "12:43 AM" mixes two different frames of reference.
Kyle Moyer wrote: You just have to understand that [...] humans don't start naturally counting at zero.
I get your point, but when I think about it, there's more than that: the original 12h clock notation probably comes from a time when we were hardly able to accurately tell the hour of the day, much less the minute. Also, people talked of the current time in terms of 'this is the third hour', referring, vaguely, to some point in time after the second, but before the (end of the) third hour had passed. Back in that time, you only ever referred to the 1st through 12th hour before mid-day (AM) or after mid-day (PM) - there was no inconsistency. Yet.
The 'problem' with the 2x12h notation probably started arising when people began measuring time between hours: to express that half an hour has passed since mid-day, in a time when '0' wasn't used or even invented, what people said instead is that 'half an hour has passed since the twelfth hour (of the morning)'. This little extension seemed natural enough, so nobody spotted (or cared about) the resulting inconsistency.
At least that's how the current notation might have come about - just a theory...
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
AM comes before PM in the alphabet and also in the day
|
|
|
|
|
But at midnight AM comes after PM.
|
|
|
|
|
Only if you count over days, which you shouldn't
My logic is infallible
|
|
|
|
|
Sander Rossel wrote: My logic is infallible Well at least it's logical, Captain.
|
|
|
|
|
I just really wanted to use that word
|
|
|
|
|
Just looking at one of your blogs at random and found a nice piece of LINQ that I actually understood.
|
|
|
|
|
Thanks!
Personally I'm a big fan of understandable and readable code, be it LINQ or something else
Unfortunately understandable and readable are two pretty obscure programming paradigms and only few programmers adopt them as part of their tool set
|
|
|
|
|
You can always google "what time is it in israel" or "what time is it in new york"
Or anywhere else for that matter.
Marc
|
|
|
|
|
12 PM is noontime and 12AM is the end of one day which also known as 24:00. So, 19:00 is 7pm or 7:00 night.
|
|
|
|
|
12 PM is noontime and 12AM is the end of one day which also known as 24:00. So, 19:00 is 7pm or 7:00 night.
|
|
|
|
|