Democratic Underground Latest Greatest Lobby Journals Search Options Help Login
Google

The calendar has to be one of the most evil torture devices ever created.

Printer-friendly format Printer-friendly format
Printer-friendly format Email this thread to a friend
Printer-friendly format Bookmark this thread
This topic is archived.
Home » Discuss » The DU Lounge Donate to DU
 
mainegreen Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Sep-08-08 01:52 PM
Original message
The calendar has to be one of the most evil torture devices ever created.
There is almost nothing more unpleasant in my job than trying to work with dates. Seriously, who came up with this crap? The horrible conjunction of year and month and week is simply the work of and endless stream of drunken monks and priests and it shows.

Let me give you an example of the horror I have to endure. Imagine, if you will, you have a set of data consisting of months. As an aside, I think months are evil and need to be permanently banished from our calendar. Well, for some reason companies love to do financials on the basis of these so called 'months', so it's not uncommon to have data based on month cycles. The problem with months is that while they, sensibly so, start at '1', they end all over the place, and the pattern, if you call call it that, is ugly and messy and not easy to work with in a clean manner. Especially February. Definitely February. So given this set of data, where each point of data is identified by a start point and represents a period of a month starting from that point, you need to pull all the data where the data intersects in time another data point. Easy right?

WRONG!

You've just been p3wned by a bunch of thirteenth century virgins. For you see, the month is a tricky beast. Not only does it represent the standard January, February, March etc. segments in time, but it can represent a chunk of time that is partially detached from the standard months. As a clear example, what is the end point of one month from January 15th? I bet most of you did not answer February first, but instead said February 15th. I'm sure some of you said February 14th, but you would still be in the month, and not fully a month from the point in time. Still, the math seems easy. Simply increment the month, right?

WRONG!

This method totally fails because the months do not have the same number of days. One month from March 31st is NOT April 31st. It's April 30th, not April 31st and not May 1rst. It gets even sillier with February which can't seem to determine just how long it is, hopping all over the place like a student waving his arm in the air trying to get the teachers attention so he can go to the bathroom because he just drank three mocha cappuccino lattes. One month from January 31st is either February 28th or February 29th. Ok, so this makes sense, no? Your ok with that last bit? Annoying, but workable, right? How about this; given the previous example, what is one month from January 28th? February 28th! February 28th is also one month from January 30th and 31rst! Wheeeeee!

And god forbid you need to step over months. January 31st goes to February 28/29th, right? And that goes to March 31st, and on to April 30th! Well, in the context of joined months, January 29th goes to February 28/29th. The next jump is NOT March 31st, even though one month from February 28/29th is March 31st. Nooooo, in the context of January 29th, the correct point in March is the 29th again! Two months from January 29th is March 29th, even though one month from January 29th is February 28/29th and one month from February 28/29th is March 31st. 1 plus 1 equals 2 except when 1 plus 1 do not equal 2 right? Or the sad truth is that one is not always one, but sometimes something else.

You begin to see my pain? How do you pull 'months' when a 'month' is a completely amorphous unit of time?! And of course, when working with large sets of data these so called 'months' are beginning all over the place, on the first middle and last and everything in between on every one of these 'month' things. And god forbid you add time to this. Imagine the horror of adding time! Daylight savings! Missing hours! Leap seconds! When is the beginning and end of a day?!!!

I hereby through my support whole hearted into the lets abandon months and daylight savings time initiative! Because leap seconds/days and the horror of weeks/years is enough cruelty.

:nuke: :rant:
Printer Friendly | Permalink |  | Top
pokerfan Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Sep-08-08 02:06 PM
Response to Original message
1. We never should have left the trees in the first place
Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy lies a small unregarded yellow sun. Orbiting this at a distance of roughly ninety-two million miles is an utterly insignificant little blue green planet whose ape-descended life forms are so amazingly primitive that they still think digital watches are a pretty neat idea. This planet has - or rather had - a problem, which was this: most of the people on it were unhappy for pretty much of the time. Many solutions were suggested for this problem, but most of these were largely concerned with the movements of small green pieces of paper, which is odd because on the whole it wasn't the small green pieces of paper that were unhappy. And so the problem remained; lots of the people were mean, and most of them were miserable, even the ones with digital watches. Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans. And then, one Thursday, nearly two thousand years after one man had been nailed to a tree for saying how great it would be to be nice to people for a change, one girl sitting on her own in a small cafe in Rickmansworth suddenly realized what it was that had been going wrong all this time, and she finally knew how the world could be made a good and happy place. This time it was right, it would work, and no one would have to get nailed to anything. Sadly, however, before she could get to a phone to tell anyone about it, a terribly stupid catastrophe occurred, and the idea was lost forever.

Printer Friendly | Permalink |  | Top
 
mainegreen Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Sep-08-08 02:11 PM
Response to Reply #1
2. That man had an almost godlike ability to see to the truly absurd heart of things
and illustrate it in an astonishingly clear and funny manner.
Printer Friendly | Permalink |  | Top
 
The2ndWheel Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Sep-08-08 02:28 PM
Response to Original message
3. While you're cleaning house, chuck the clocks too
Printer Friendly | Permalink |  | Top
 
mainegreen Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Sep-08-08 02:34 PM
Response to Reply #3
4. Don't think I won't!
Printer Friendly | Permalink |  | Top
 
The2ndWheel Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Sep-08-08 02:43 PM
Response to Reply #4
7. I was hoping you would!
I'll even give you frontzies. Unfortunately, there are more than enough clocks to go around.
Printer Friendly | Permalink |  | Top
 
DS1 Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Sep-08-08 02:38 PM
Response to Original message
5. This is why I love unix-time stamps
even though they're not always perfect, figuring out the month, then adding/subtracting 2419200 if Feb for example, is close enough.
Printer Friendly | Permalink |  | Top
 
mainegreen Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Sep-08-08 02:41 PM
Response to Reply #5
6. Praise Jesus!
When I first started using them for dates in certain applications, I nearly cried I was so happy.

Well, maybe not nearly cried, but I was pretty god damned happy.
Printer Friendly | Permalink |  | Top
 
DU AdBot (1000+ posts) Click to send private message to this author Click to view 
this author's profile Click to add 
this author to your buddy list Click to add 
this author to your Ignore list Wed May 01st 2024, 01:02 AM
Response to Original message
Advertisements [?]
 Top

Home » Discuss » The DU Lounge Donate to DU

Powered by DCForum+ Version 1.1 Copyright 1997-2002 DCScripts.com
Software has been extensively modified by the DU administrators


Important Notices: By participating on this discussion board, visitors agree to abide by the rules outlined on our Rules page. Messages posted on the Democratic Underground Discussion Forums are the opinions of the individuals who post them, and do not necessarily represent the opinions of Democratic Underground, LLC.

Home  |  Discussion Forums  |  Journals |  Store  |  Donate

About DU  |  Contact Us  |  Privacy Policy

Got a message for Democratic Underground? Click here to send us a message.

© 2001 - 2011 Democratic Underground, LLC