Calendar issues

Andrew Paprocki andrew at ishiboo.com
Fri Sep 14 16:56:55 PDT 2012


Well just to be clear, there is no year 0 when referring to the eras
BC/AD. ISO8601 explicitly calls for a year 0 which corresponds with 1
BC. So as long as any interaction with ISO8601 preserves that
behavior, it sounds good.

-Andrew

On Fri, Sep 14, 2012 at 3:32 PM, Norbert Lindenberg
<ecmascript at norbertlindenberg.com> wrote:
> Sounds like we're converging on a proleptic Gregorian calendar with no year 0. Any objections?
>
> Thanks,
> Norbert
>
>
> On Sep 13, 2012, at 15:48 , Mark Davis ☕ wrote:
>
>> I really was not very clear about what I think; sorry for rambling a bit.
>>
>> Yes, I agree that the best result for Gregorian is to have correct era support, which means there is no year zero: you have 2 AD, 1 AD, 1 BC, 2 BC,...
>>
>> Mark
>>
>> — Il meglio è l’inimico del bene —
>>
>>
>>
>> On Thu, Sep 13, 2012 at 1:38 PM, Norbert Lindenberg <ecmascript at norbertlindenberg.com> wrote:
>> The output of Date.prototype.toLocaleString and DateTimeFormat.prototype.format is also intended for normal people, not for techies. So why should we introduce a year 0 for them?
>>
>> Norbert
>>
>>
>> On Sep 13, 2012, at 13:31 , Mark Davis ☕ wrote:
>>
>> > In ICU, we are using Gregorian eras (AD/BC) as customarily interpreted, and there is no year zero. There isn't a simple way to get non-era years—and that form is mostly interesting to techies, not normal people, which is why we support the era form.
>> >
>> > (If someone wanted to do it, you could probably get reasonable results by taking the input date, parsing with a calendar, and if the year < 1, set the year field to 1-year, get the date pattern for the locale, get the number pattern for a negative integer in the locale, insert the prefix/suffix around the year field in the date pattern, and format the Calendar date. That's be a dozen or two lines of code, but would need some extra code for exceptions.)
>> >
>> > Mark
>> >
>> > — Il meglio è l’inimico del bene —
>> >
>> >
>> >
>> > On Thu, Sep 13, 2012 at 8:40 AM, Norbert Lindenberg <ecmascript at norbertlindenberg.com> wrote:
>> >
>> > On Sep 13, 2012, at 6:55 , Andrew Paprocki wrote:
>> >
>> > >>>> and Explorer formats it as being in the year 1 BC. Safari calculates the day
>> > >>>> according to the Julian calendar, all others use the proleptic Gregorian
>> > >>>> calendar.
>> > >
>> > > That is very surprising to me. Can anyone comment on why Safari chose
>> > > that implementation?
>> >
>> > Probably because that's the default used for date and time formatting in ICU. ICU can be made to use a proleptic calendar by setting the Gregorian cutover to the beginning of time; I don't see an easy way to make it introduce a year 0.
>> >
>> > Norbert
>> >
>> >
>>
>>
>


More information about the es-discuss mailing list