Template talk:OldStyleDate/temp
Latest comment: 3 years ago by Carn in topic Test
Test
edit(proof of concept)·Carn·!? 19:41, 9 June 2021 (UTC)
- 6 January 1705 — 6 january 1705 [O.S. 26 december 1704]
- January 6, 1705 — january 6 1705 [O.S. december 26 1704]
- 1705-01-06 — january 6 1705 [O.S. december 26 1704]
- 2 February|1905|20 January — 2 february [O.S. 20 january] 1905
- February 2|1905|January 20 — february 2 [O.S. january 20] 1905
Commentary
editLooking good! A few observations:
- In English, month names are always capitalised, so January not january etc.
- I added a case of January 6, 1705 and see a styling error in the output: comma needed between day and year.
- It would be best to preserve the style, so the outputs from {{OldStyleDate|y-m-d}} should be
y-m-d (O.S. y-m-d)
- Do we really have instances of dd mmmmmm|yyyy|dd nnnnnnn?? I have never seen any. What happens to errors like {{OldStyleDate/temp|2 February|1905|30 January}} (it produces 2 february [O.S. 20 january] 1905 but on what basis could you decide that 2 Feb was right and 30 Jan was wrong – maybe it was the other way round. So you could only flag an error, surely?
These are details, great work.--John Maynard Friedman (talk) 16:20, 14 June 2021 (UTC)
- Yes, I too think that it'll be best to preserve the style - to do this, I need to separate some of the patterns in order to know exactly which worked and what was the style of the incoming message - here I planned to dig in the dump of enwiki on next weekend and find in what form people actually enter dates into these patterns. Capitalization and comma-detection will be in those patterns.About errors - it can be category and red font in prewiew. And we can't know if the dates don't match why is that - one common error is then old style date and new style date need to swap vice-versa.
I also plan to calc day difference between partial dates (without a year) and if it is too big or too small - put a category. But this is last stage of work. ·Carn·!? 09:01, 15 June 2021 (UTC)