Possible bug in Calendar

H

Harold Yarmouth

Lew said:
I had cited the work before.

Readers of these posts may refer to my response to Arne's post regarding
my supposed "ignorance and unwillingness to learn"; apparently anyone
that does not know Latin is ignorant and anyone who does not go learn it
immediately upon encountering a fragment of Latin in some random,
pointless, and off-topic Usenet post displays "unwillingness to learn".

Personally, I'd instead call both of them symptoms of "unwillingness to
waste one's time on difficult, obsolete, and
uninteresting-to-one-personally subject matter", and also of "having a
birth date after circa 1500 CE" and "not being a Catholic priest", but
what the hey.
 
B

bbound

Without feedback loops--negative feedback loops, in fact--you'd die.
Your body has several negative feedback loops intended to prevent
escalation of certain disorders.

Those are not the particular feedback loops that I object to.
 
H

Harold Yarmouth

Arne said:
It has been clearly demonstrated that you missed that Lew was
referring to Joshua

What has been clearly demonstrated is that I don't know beans about
Latin. That is a very different thing from "missing the point", and it
is also not any kind of crime, failing, or justification for your hostility.

Furthermore, none of this seems to have anything to do with Java, so I
respectfully suggest that this is not the appropriate forum for
continuing this. Not that I see much point in your continuing this.
 
H

Harold Yarmouth

Arne said:
That would make the milliseconds part of Date rather useless.

Not given that there are other ways to get a Date. Anyway, the real
issue is why the most-precise "set" method doesn't either set the
milliseconds to a caller-specified value or else set them to zero or
some other such predetermined value. I cannot see any real use for being
able to say "change this time from Tue Oct. 27 2003, 4:17:11 and change
to the exact same number of milliseconds after Thurs Oct. 29 2003
8:11:49" and the like.
What about providing a set method that can set milliseconds ?

Not good enough. A method should exist such that someone can completely
determine the output with just one method call. Your proposal would not
satisfy that requirement.
 
L

Lars Enderin

Harold said:
Readers of these posts may refer to my response to Arne's post regarding
my supposed "ignorance and unwillingness to learn"; apparently anyone
that does not know Latin is ignorant and anyone who does not go learn it
immediately upon encountering a fragment of Latin in some random,
pointless, and off-topic Usenet post displays "unwillingness to learn".

Personally, I'd instead call both of them symptoms of "unwillingness to
waste one's time on difficult, obsolete, and
uninteresting-to-one-personally subject matter", and also of "having a
birth date after circa 1500 CE" and "not being a Catholic priest", but
what the hey.

Understanding a Latin abbreviation often used in scientific works was
not essential to interpreting Lew's posting that referred to a Java
"god". You only needed to click on a simple link (URL). Instead, you
keep making wrong assumptions and accusations.
Typical Twisted behaviour.
 
J

Joshua Cranmer

Harold said:
Most high school curricula do not cover Latin, least of all in an
English course. I am surprised to hear that apparently a high school
exists that does so, rather than placing it where it obviously belongs,
either in its own class or in History And Geography.

Do you know what `Homo sapiens' is? The short word `circa' (often
abbreviate as `c.')? `et cetera' (etc.)? A lot of writing uses
abbreviations of Latin words or phrases. Any basic technical writing
course should cover these.
(Fixed up attributions. Somehow my words were being attributed to Joshua
Cranmer instead of to me.)

Actually, those were my very own words. You dirty thief. ;-)
 
L

Lew

Those are not the particular feedback loops that I object to.

Damn it. I wish I hadn't wiped out my old kill file.

Re-plonked. De mortuis nil nisi bonum. Ok, in this case, de stultis nil nisi
malum. Stultus est sicut stultus facit, as my momma used to say.
 
D

Dr J R Stockton

Mon said:
Most high school curricula do not cover Latin, least of all in an
English course. I am surprised to hear that apparently a high school
exists that does so, rather than placing it where it obviously belongs,
either in its own class or in History And Geography.

What experience do you have of anything outside the USA and possibly
Canada?
 
J

John W Kennedy

Joshua said:
Do you know what `Homo sapiens' is? The short word `circa' (often
abbreviate as `c.')? `et cetera' (etc.)? A lot of writing uses
abbreviations of Latin words or phrases. Any basic technical writing
course should cover these.

I still can't believe that he graduated high school without learning how
to do attributions. Unless, perhaps, he was in the "future unskilled
laborer" group. (Hmmm.... That /would/ explain why he's so touchy about
anything suggesting that his intellectual attainments are less than
complete.)
--
John W. Kennedy
"When a man contemplates forcing his own convictions down another
man's throat, he is contemplating both an unchristian act and an act of
treason to the United States."
-- Joy Davidman, "Smoke on the Mountain"
 
H

Harold Yarmouth

Arne said:
You would have gotten a lot of votes.

From you stuffing the ballot box.

You are completely wrong about me, though. And you are wrong to keep
posting large volumes of non-Java-related crap to this newsgroup. Please
stop it. It can serve no useful purpose.
 
H

Harold Yarmouth

Arne said:

A quick skim of that article reveals that it does not have anything
whatsoever to do with Java.

You are posting to the wrong newsgroup.

A quick search of the groups available at my server shows
alt.just.trolling and alt.rec.trolling as two likely more-appropriate
newsgroups for your posts. There's also an alt.troll.

I respectfully suggest that your non-Java-related posts might be better
off posted to one of those newsgroups, not to comp.lang.java.programmer,
and that your Java-related posts remain here but be entirely and solely
about Java.
 
L

Lew

And the horse it rode in on?

Mike, you obviously studied Classical Latin, not just (or instead of?) Church
Latin. My high-school Latin teacher would've been proud of you.
 
A

Arne Vajhøj

Lew said:
Mike, you obviously studied Classical Latin, not just (or instead of?)
Church Latin. My high-school Latin teacher would've been proud of you.

There is an old saying that everyone should learn one of the four
classic languages: Greek, Latin, Fortran and Cobol.

Well - I know Fortran.

:)

Arne
 
M

Mike Schilling

Lew said:
Mike, you obviously studied Classical Latin, not just (or instead
of?) Church Latin. My high-school Latin teacher would've been proud
of you.

I did, though I'm not sure how a collection of bad puns displays that.
One of my (public) high school's English teachers was a classicist,
and she had permission to teach latin as long as she could fill the
classes. I expect Latin ended there when she retired. My son's now
taking Latin, though that's more natural, since his high school is run
by Jesuits.
 
H

Harold Yarmouth

Arne said:
"mention that an awful lot of them do" does not qualify as
"mention any".

That's ridiculous. You might as well have just claimed that 10 < 1.

What happened, the number of them exceeded your brain's
Integer.MAX_VALUE and wrapped around to become negative?
Well - you just agreed with me (see above).

I did not.
 
H

Harold Yarmouth

Arne said:
You have completely misunderstood the purpose of Calendar.

No, I have not. And you must stop publicly insulting me and publicly
lying about me now.

I have understood that Calendar is being used for two distinct purposes,
one of which is Locale-dependent in some way that goes beyond time
zones, and one of which is not.

Those uses should be separated into two different classes.

We are now basically quibbling over which of those to call Calendar and
which to call something else.

A pointless quibble if you ask me. Actually I'd favor keeping Calendar
similar to as-is and creating DateBuilder for basic Date-construction
jobs that don't need to care about any localization (except perhaps for
time zone matters).
It is not a formatting/parsing class.

I never claimed it was.
It is a class that applies the rules of the calendar.

Collator is a class that applies locale-dependent rules for Strings, but
you don't see Collator doing double-duty as StringBuilder.
You are telling people that computer programs should use your
calendar and not their own.

No! I am not! I am saying that the CORE of the LANGUAGE does not need to
support other than a sensible, widely-used default in this case -- more
peripheral classes or third-party ones can provide the other functionality.

I think that you are INTENTIONALLY misrepresenting what I've said as an
argument in favor of forbidding non-Gregorian calendar code ever to be
written in Java. It is not. I have never said as much. I have only
debated what should or should not be part of the core set of utility
classes.

I don't know why you keep misrepresenting me. I guess you're trying to
discredit what I say, for whatever reason. The stupid thing is, anyone
can go back to read what I actually wrote and see that you're lying your
ass off, so I don't understand why you bother to even try. It's
pointless and idiotic, and only a moron won't see right through you.
Same deal as with your deliberate misquotations earlier.

Please give it up. You are not really arguing about anything to do with
Java anymore, not as part of an honest debate and a quest for greater
understanding of Java anyway. You are just being boorish and rude out of
some sort of grudge or personal axe to grind. This is not the
appropriate venue for such behavior. Take it elsewhere.
Yes.

And BTW it is not even correct.

Yes it is.
Some types of business logic requires Calendar knowledge.

I use "business logic" to refer to the core operations only, not
whatever goes on peripherally to translate them into a user-visible
interface and to translate the user's input back in. Calendar basically
gives locale-dependent names to things like "23885436548839 milliseconds
since the epoch" and translates such back, including dates and
locale-dependent intervals and "next foobar after bazquux" type
constructs. This sort of thing is generally in the next outermost layer
of an application below the Swing/AWT using layer, along with
MessageBundle and Collator usage and lots of other Locale-related code.
Layers deeper than those top two generally shouldn't mess with Locale
save perhaps to keep track of an app-wide locale setting, store it
somewhere, and restore it.
They are not in Date - they are in Calendar.

I said "in the core Date class and its builder object"; the latter is,
at present, Calendar.
And Calendar is not a Date builder.

Yes it is. It is not SOLELY a Date builder, but it is a Date builder.
Read Date's constructors' Javadocs if you don't believe me. Most of them
are deprecated with a note pointing to Calendar. Ergo, Date construction
is generally done via Calendar instead of directly. Ergo, Calendar
functions as a Date builder.
So wrong twice.

NO. YOU ARE THE ONE WHO IS WRONG HERE, AND YOU ARE WRONG BECAUSE YOU
KEEP INTENTIONALLY MISREADING MY WORDS.

I SUGGEST A SIMPLE SOLUTION FOR THAT: STOP READING MY WORDS AT ALL.
SINCE YOU ARE APPARENTLY INCAPABLE OF REASON OR OF CIVILITY, AT LEAST
WHENEVER ADDRESSING ME, YOU SHOULD KILLFILE ME OR OTHERWISE IGNORE ME
STARTING IMMEDIATELY.
 
H

Harold Yarmouth

No, YOU are not even correct. I don't consider Calendar manipulations
(other than just Date building) to be "business logic" any more than I
consider using Collator to sort something on its way to being displayed
in the UI to be "business logic". It's part of the interface layer. The
business logic only knows from "milliseconds since the epoch" and,
perhaps, the translations of same into Gregorian dates in (preferably)
UTC+0000.
Case in point: I'm on the programming staff of a multi-million-dollar
Java EE project involving electronic documents (XML, among other things)
sent to a central location from all over the world. java.util.Calendar
is essential to that project to coordinate the various time zones
involved, including business rules as to due dates, intervals between
document submissions and the like.

That is not a "case in point". Locale-specific rules may be involved in
providing the localized user interfaces, including selection of which
business rules to apply, but in the core logic classes I *hope* your
Dates are all represented in one particular time base and that when the
chosen business rules say "x is three days after y" it just adds
3*86400*1000ms to some number somewhere under the hood.

If a Locale determines whether that parameter is "three" or "five" or
some other number, that doesn't matter. It's still (I hope!) happening
in a layer not far beneath the UI layer.

Because if you've got mixed time-zones (or worse) in the core data
representations you've got big trouble on the way.
Calendar is most assuredly a core business-logic class for that project.

No. See above.
 
H

Harold Yarmouth

Arne said:
Which it also is in Java - the Date class.

But Java need something to match that with calendars - and it has.

There's a problem with this, though -- those deprecated Date
constructors. How is someone supposed to get a Date from, say, numbers
extracted from a time stamp in some text file in a natural way?
Calendar.getInstance(), set(yy, mm, dd, h, m, s), getTime() runs into
the problem that started this whole mess, and involves Calendar. Where
is the simple, easy to use DateBuilder that does not have these problems?

And why are you so dead set against the idea that adding one would be a
good idea?
Oh - and it is not just PL - it is also BLL.

No. See an earlier post.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,792
Messages
2,569,639
Members
45,353
Latest member
RogerDoger

Latest Threads

Top