polyglossia icon indicating copy to clipboard operation
polyglossia copied to clipboard

Offer a \today-like command with month and year only

Open eyalroz opened this issue 2 years ago • 1 comments

Sometimes, people want to refer to the current month - which means the month-within-year and the year. \today doesn't cut it, and since the ordering/layout of month-cum-year differs between languages, users are a bit stuck. It would be nice if we have a \todayasmonth or some similar command which produces this.

See also this SO question.

eyalroz avatar Aug 01 '22 08:08 eyalroz

As to the SO question: AFAICS this doesn't work with babel either, and I think the reason is that datetime2-hebrew is not really maintained and probably not fully working. Independent of whether polyglossia implements an own way of doing that, it would be good if someone took up maintenance of datetime2-hebrew, as this package can do so much more we never can provide.

jspitz avatar Aug 06 '22 10:08 jspitz

Looking at it again, I think this should be fixed in datetime2-hebrew itself.

jspitz avatar May 21 '23 15:05 jspitz

@jspitz : You could file it as an issue there before closing it here...

eyalroz avatar May 21 '23 18:05 eyalroz

You can do that, it's your request. I suppose the answer will be: somebody needs to take maintenance for datetime2-hebrew.

jspitz avatar May 22 '23 06:05 jspitz

For the record, something like the attached would need to be done in datetime2-hebrew to make showdayofmonth and showyear work with polyglossia. As I do not read Hebrew, I am not sure the output is entirely correct, but this could be adopted easily by someone in the know.

You can test this (both with calendar=hebrew and calendar=gregorian in polyglossia Hebrew) and propose it to Nicola (the datetime2 author and current datetime2-hebrew maintainer) if you want.

datetime2-hebrew.ldf.txt (I have added the txt suffix only to get it accepted by the tracker. Remove it for testing.)

jspitz avatar May 22 '23 09:05 jspitz

This one should also work for babel (untested): datetime2-hebrew.ldf.txt

jspitz avatar May 22 '23 11:05 jspitz

@nlct I just want to bring this to your attention.

Would you be interested in integrating this to datetime2-hebrew? As said, I cannot take over maintenance, and as I do not speak Hebrew, this would certainly need careful audit and testing. But maybe @eyalroz is willing to at least test and give advice on correctness of output. I take it that a range of other things would need to be done to get datetime2-hebrew on par with other language modules.

jspitz avatar May 23 '23 06:05 jspitz

I'm sorry, I can't speak Hebrew, and I'm already behind on a major refactor of datatool, so I certainly wouldn't have the time to look at it until after that work is completed.

nlct avatar May 23 '23 09:05 nlct

Fair enough @nlct. Should you ever find the time and energy for it, you can come back to this ticket. Maybe a Hebrew user steps up in the meantime and takes care for the module.

jspitz avatar May 23 '23 09:05 jspitz