Re: Possible bug in Calendar



Joshua Cranmer wrote:
Harold Yarmouth wrote:
Joshua Cranmer wrote:
Nice to know that you're so culturally sensitive in ignoring

"Cultural sensitivity" is neither here nor there. "Cultural sensitivity" is not a major concern of programming language or API design. It may be a concern of application user-interface design, but that's a whole different kettle of fish.

I was referring to "cultural sensitivity" to be polite in suggesting "You have an arrogant Anglo-Amerocentric viewpoint."

You should not suggest an insulting lie about me at all. In future, don't.

There are countries who use non-Gregorian calendars for civil purposes, by requiring that the API dictate everything in Gregorian, you've essentially said "screw you" to said countries.

Bull. I only suggested that the CORE part of the API do everything with one standard time representation. There can be a translation class used to interface to the user using whatever means of measuring and naming times that they prefer, of course, but the core should be something simple and world-standard, like a Gregorian calendar or seconds since the epoch or whatever.

Someone else posted a link to a JSR that details how to do this right, or at least better.

Which means using the plain-Jane Gregorian calendar under the hood in Date and other business objects related to dates, with DateFormat or other similar classes providing translations into locale-specific representations.

When viewed pedantically, the typical fiscal calendar is not even the same as the civil Gregorian calendar in place in most countries: March 1, 2009 is in the same fiscal year as November 2, 2008.

The last time I checked, fiscal calendars vary from organization to organization. There users have to supply their own code to translate from a standard time format into their local fiscal calendar.

So if I'm doing calculations on a fiscal calendar, it should tell
me that the two are in the same year, right?

Yes, though the core Date class won't do so.

If Calendar's sole purpose was this sort of translation there wouldn't be a problem. But Calendar is also the "DateBuilder" because Date has no non-deprecated methods or constructors to directly build a standard date using standard units, say from one encoded in such units in a file or a network packet.

Note that time is near-impossible to determine good APIs for since the human concept of time is not even consistent, let alone the technical muck designed to make it saner for human use.

See that JSR.
.



Relevant Pages

  • Re: Several pages of calendar need translation
    ... give me an interpretation so that I can compare with one I received ... I find it surprising that we have clear evidence that the guy's wife is ... than $100, and if it's a reputable translation agency, his "anonymity" ... those little heart marks on a calendar? ...
    (sci.lang.japan)
  • Re: 5 different questions from a Newbie
    ... does it automatically go onto my calendar and create a reminder?? ... > 1) No. Outlook's form designer is for Outlook only. ... As I understand it, whether custom field information is available on the Treo depends on whether your sync program supports custom fields, but I don't track which sync program does what. ... >>I noticed that there is a book from Sue Mosher - regarding how to design your ...
    (microsoft.public.outlook.program_forms)
  • Re: Possible bug in Calendar
    ... It may be a concern of application user-interface design, but that's a whole different kettle of fish. ... Imagine if it were otherwise -- Calendar would not accept dates before 4004 BC, to avoid offending Christians, or after 2012, to avoid offending Mayans. ... Programs written in Java would refuse to work on Sundays. ... Java need to support multiple calendars to support people that ...
    (comp.lang.java.programmer)
  • Re: Form design
    ... >I have been asked to do a quick access database to schedule use of class ... table design and no end of trouble later. ... >wants the form to look just like the calendar. ... A listbox is not a data STORAGE medium; ...
    (microsoft.public.access.forms)
  • Re: Possible bug in Calendar
    ... It may be a concern of application user-interface design, but that's a whole different kettle of fish. ... Imagine if it were otherwise -- Calendar would not accept dates before 4004 BC, to avoid offending Christians, or after 2012, to avoid offending Mayans. ... It is not racist to think that only the Gregorian calendar is needed. ... It covers the vast majority of programming needs, since it's a defacto international standard throughout the developed world and throughout international commerce. ...
    (comp.lang.java.programmer)