On Jul 27, 8:56 pm, "Tad Perry" <
tadpe...@comcast.net> wrote:
>
> 1989 is partially both Showa 64 and Heisei 1.
>
> I see that Showa 64 is not recognized at all, but Heisei 1 gives 1989, so I
> assume that however a year ended is how the entire year is treated.
Yes, your comment is very astute. In fact the underlying data contains
the date of the change but this is not presented to the user. It
definitely should include this information.
> The absolute easiest, most minimalistic way to handle this would be to add
> the date an era started and ended using the Western Calendar every time that
> era is named in parentheses. (In the front is easiest.)
> That may not be the best ultimate solution, but for the time being it would
> take no extra coding, just adding it to the string already being used.
>
> Entering 1989 would then return:
>
> (1989/1/8 to Present) Heisei 1
>
> Everyone could then infer that the era given for the previous year plus one
> covers 1989/1/1 through 1989/1/7.
I don't know why you think this doesn't involve any extra coding!
Actually that date script is rather a gruesome thing. I had only just
started to learn Perl when I wrote it and I was still struggling a
lot, which really shows in the code. The J. era to Western year thing
is bolted on to the Frankenstein's monster.
> A more elegant solution could be worked on later, but this actually gives
> additional valuable information as many people looking up a given year might
> wonder when the era they encounter started and ended. This would tell them,
> saving them an additional Google search.
Thanks, what you said is entirely correct but a fatigue has set in to
this project. I will try to reinvigorate myself enough to add the
correct ending year and the date of the start of the era.