How to customize Q-Date's year
Some countries do not use A.D., like Japan.
I would like to know how to customize Q-Date’s year.
Because I need to subtract 1911 from A.D. as Q-Date pick year.
Use the date utilities.
@s-molinari I spent some time and I still didn’t seem to succeed.
Also found that my description was wrong
subtractFromDate is not what I need
I made some diagrams to illustrate my needs.
Sorry to my poor long English expression.
I made a Codepen to express my problem, but the choice of the year should be the same as the picture.
V-model is “2020-03-31” but datepick’s year need show “民國109” (2020subtract1911)
Looking at this, you are going to need to do a lot more. https://github.com/commenthol/date-chinese/blob/master/src/Chinese.js
@s-molinari Thanks for the reply, the Republic of China calendar(it has another name call “TaiwanCalendar”) is not the lunar calendar(Chinese calendar), it is closer to wareki(Japan calendar).
Only need to change the year display instead .
Not complicated calculations
AD 2020-03-31 same about the ROC calendar 109-03-31 (They’re the same as Tuesday)
Republic of China calendar start about 1912 AD.
The ROC calendar works exactly like the Gregorian calendar, except that the year and era are different.
like…emmmm…this one?C# taiwancalendar
Sorry for that. Maybe I should e.g. wareki .
In Japanese calendar(wareki) 2019AD is call “令和元年”(Reiwa 1st year)
2020AD is call Reiwa 2st year
Unfortunately, I don’t think this is going to work. The QCalendar looks for the date and builds the calendar accordingly. So, if you switch the years to 109, you end up with the 31st of March on a Sunday. So, it’s still the Gregorian calendar being shown.
Adding an option for the ROC calendar would require an improvement request in GH.