Open claudia-sutter opened 3 years ago
somewhat related see #3477
@claudia-sutter please could you share some code or even better a test case? (as suggested in the GitHub issue template), see http://www.exist-db.org/exist/apps/doc/xqsuite ; a test is essential as it is not common knowledge how to handle these dates.
for me this report is not yet usable, it requires too much time to investigate, outcome is not clear.
xpath https://www.w3.org/TR/xpath-functions-3/#rules-for-datetime-formatting
this issue is in essence a feature request.
@claudia-sutter please be more specific which calendar you need. "all" is not specific not realistic. from the spec:
Designator | Calendar |
---|---|
AD | Anno Domini (Christian Era) |
AH | Anno Hegirae (Muhammedan Era) |
AME | Mauludi Era (solar years since Mohammed's birth) |
AM | Anno Mundi (Jewish Calendar) |
AP | Anno Persici |
AS | Aji Saka Era (Java) |
BE | Buddhist Era |
CB | Cooch Behar Era |
CE | Common Era |
CL | Chinese Lunar Era |
CS | Chula Sakarat Era |
EE | Ethiopian Era |
FE | Fasli Era |
ISO | ISO 8601 calendar |
JE | Japanese Calendar |
KE | Khalsa Era (Sikh calendar) |
KY | Kali Yuga |
ME | Malabar Era |
MS | Monarchic Solar Era |
NS | Nepal Samwat Era |
OS | Old Style (Julian Calendar) |
RS | Rattanakosin (Bangkok) Era |
SE | Saka Era |
SH | Mohammedan Solar Era (Iran) |
SS | Saka Samvat |
TE | Tripurabda Era |
VE | Vikrama Era |
VS | Vikrama Samvat Era |
@dizzzz I'm sorry if this issue comes in the wrong place. I was directly directed to this place here.
As mentioned, I'm speaking about the Julian Calender, in this list called OS (Old Style).
I can help in putting up a test case.
@claudia-sutter you shared a code example with me. Can you include it in your description?
xs:date("1475-07-18")
=> format-date("[FNn] [D]. [MNn] [Y]", "de", "OS", ())
This gives the weekday in the gregorian calender, which is sunday. But the right weekday is tuesday.
@claudia-sutter thnx for clarifying, the julian calendar was not mentioned in the original posting I see in the history. Maybe we crossed adding details. The location is good, we can track the issue here nicely.
Interestingly the code completely ignores the calendar parameter; I estimate the suggested change... is a big one.
Does saxon actually support it? result is [Calendar: AD][Language: en]Sunday 18. July 1475
. code here
@dizzzz This is exactly what I was told (that the calender is not mentioned in the code) before I was invited here. I guess this is the reason I was sent here. As I am only using code and not writing it, I don't know what to do next.
we'd need to investigate the request, and hopefully we can implement it.
The goal is to display the weekday, when a
<date/ >
,<origDate/ >
or the like is written in the XML-code and processed by an .odd-file. Apparently, there is no$calendar
parameter mentioned (says user @line-o in the e-editiones slack channel).It seems that per default the gregorian calendar is applied when displaying the weekday together with a date. As the gregorian calender system was only installed in 1582 (in christian europe), all sources dating before this year use the julian calendar. As a consequence, the wrong weekday is displayed when a xml-source with
<date @when="1475-07-18"/>
for example is processed.Please make sure that different calendars can be applied and processed.