মডিউল আলাপ:বয়স

সাম্প্রতিক মন্তব্য: আফতাবুজ্জামান কর্তৃক ২ বছর পূর্বে "নিজের মনে রাখার জন্য" অনুচ্ছেদে

example সম্পাদনা

  • {{#time:Y-m-d|2018-2-9|en}} → 2018-02-09
  • {{#time:Y-m-d|9 February 2018|en}} → 2018-02-09

But

  • {{#time:Y-m-d|২০১৮-০২-০৯|en}}ত্রুটি: অবৈধ সময়
  • {{#time:Y-m-d|৯ ফেব্রুয়ারি ২০১৮|en}}ত্রুটি: অবৈধ সময়

So, we use Module:ConvertTime to convert bn to en:

  • {{#time:Y-m-d|{{#invoke:ConvertTime|main|২০১৮-০২-০৯}}|en}} → 2018-02-09
  • {{#time:Y-m-d|{{#invoke:ConvertTime|main|৯ ফেব্রুয়ারি ২০১৮}}|en}} → 2018-02-09

(Currently Module:ConvertTime doesn't have a function to call from another module. So we need to add one (like you did with Module:ConvertDigit.))

--আফতাবুজ্জামান (আলাপ) ১৯:০০, ২০ ফেব্রুয়ারি ২০১৯ (ইউটিসি)উত্তর দিন

Thanks but I'll put the necessary code in Module:Age without calling another module. I'm planning that but it will be a couple of days before anything happens. Johnuniq (আলাপ) ০৯:৩৪, ২১ ফেব্রুয়ারি ২০১৯ (ইউটিসি)উত্তর দিন

@আফতাবুজ্জামান: I just wasted a bunch of time trying to test Template:Time_interval by previewing an edit to this module. Nothing I did had any effect. Now I see that this module is junk, and the actual module is Module:বয়স which I cannot edit despite it being almost unused. I need something I can work with and some tests. Johnuniq (আলাপ) ০৬:১২, ২৩ ফেব্রুয়ারি ২০১৯ (ইউটিসি)উত্তর দিন

@Johnuniq: Sorry about that, i removed protection. And below i added some example for you to test. --আফতাবুজ্জামান (আলাপ) ১৮:৩০, ২৩ ফেব্রুয়ারি ২০১৯ (ইউটিসি)উত্তর দিন

Localization সম্পাদনা

@আফতাবুজ্জামান: I have updated the module. Please edit for these translations:

  • Edit the messages in the mtext table.
  • Edit the names table in function dateDifference (year, y, yr, and so on).

Then testing is needed! I put this new section before the tests in case more of them are added. You might want to change "age in years and months" to use the module, or put it in the sandbox first and use the sandbox version for the tests. Johnuniq (আলাপ) ০২:৫৯, ২৬ ফেব্রুয়ারি ২০১৯ (ইউটিসি)উত্তর দিন

@Johnuniq: Thank you very much. I updated some templates and so far everything is working as expected. I will test more and if i find anything, i will let you know. --আফতাবুজ্জামান (আলাপ) ০০:১৪, ২৭ ফেব্রুয়ারি ২০১৯ (ইউটিসি)উত্তর দিন

test সম্পাদনা

Template:Death date and age/sandbox সম্পাদনা

Examples when all parameters are known
{{Death date and age/sandbox |1993|2|24 |1921|4|12 }} → ২৪ ফেব্রুয়ারি ১৯৯৩(1993-02-24) (বয়স ৭১)
{{Death date and age/sandbox |1993|2|24 |1921|4|12 |df=yes}} → ২৪ ফেব্রুয়ারি ১৯৯৩(1993-02-24) (বয়স ৭১)
{{Death date and age/sandbox |1993|2|24 |1921|4|12 |mf=yes}} → ফেব্রুয়ারি ২৪, ১৯৯৩(1993-02-24) (বয়স ৭১)
{{Death date and age/sandbox |১৯৯৩|২|২৪ |১৯২১|৪|১২ }} → ২৪ ফেব্রুয়ারি ১৯৯৩(1993-02-24) (বয়স ৭১)
{{Death date and age/sandbox |১৯৯৩|২|২৪ |১৯২১|৪|১২ |df=yes}} → ২৪ ফেব্রুয়ারি ১৯৯৩(1993-02-24) (বয়স ৭১)
{{Death date and age/sandbox |১৯৯৩|২|২৪ |১৯২১|৪|১২ |mf=yes}} → ফেব্রুয়ারি ২৪, ১৯৯৩(1993-02-24) (বয়স ৭১)
{{Death date and age/sandbox|1 May 2010|24 February 1993}} → "১ মে ২০১০(2010-05-01) (বয়স ১৭)"
{{Death date and age/sandbox|১ মে ২০১০|২৪ ফেব্রুয়ারি ১৯৯৩}} → "১ মে ২০১০(2010-05-01) (বয়স ১৭)"
Examples when only death-related parameters are known
{{Death date and age/sandbox |1993|2|24 |1921|4 |df=yes}} → ২৪ ফেব্রুয়ারি ১৯৯৩(1993-02-24) (বয়স ৭১)
{{Death date and age/sandbox |1993|2|24 |1921 |mf=yes}} → ফেব্রুয়ারি ২৪, ১৯৯৩(1993-02-24) (বয়স ৭১–৭২)
{{Death date and age/sandbox |১৯৯৩|২|২৪ |১৯২১|৪ |df=yes}} → ২৪ ফেব্রুয়ারি ১৯৯৩(1993-02-24) (বয়স ৭১)
{{Death date and age/sandbox |১৯৯৩|২|২৪ |১৯২১ |mf=yes}} → ফেব্রুয়ারি ২৪, ১৯৯৩(1993-02-24) (বয়স ৭১–৭২)

Template:Birth date and age/sandbox সম্পাদনা

Unnamed parameters for year, month, day
{{Birth date and age/sandbox|1993|2|24}} → " (1993-02-24) ২৪ ফেব্রুয়ারি ১৯৯৩ (বয়স ৩১)"
{{Birth date and age/sandbox|1993|2|24|df=yes}} → " (1993-02-24) ২৪ ফেব্রুয়ারি ১৯৯৩ (বয়স ৩১)"
{{Birth date and age/sandbox|1993|2|24|mf=yes}} → " (1993-02-24) ফেব্রুয়ারি ২৪, ১৯৯৩ (বয়স ৩১)"
{{Birth date and age/sandbox|১৯৯৩|২|২৪}} → " (1993-02-24) ২৪ ফেব্রুয়ারি ১৯৯৩ (বয়স ৩১)"
{{Birth date and age/sandbox|১৯৯৩|২|২৪|df=yes}} → " (1993-02-24) ২৪ ফেব্রুয়ারি ১৯৯৩ (বয়স ৩১)"
{{Birth date and age/sandbox|১৯৯৩|২|২৪|mf=yes}} → " (1993-02-24) ফেব্রুয়ারি ২৪, ১৯৯৩ (বয়স ৩১)"
Named parameters for year, month, day
{{Birth date and age/sandbox|year=1993|month=2|day=24}} → " (1993-02-24) ২৪ ফেব্রুয়ারি ১৯৯৩ (বয়স ৩১)"
{{Birth date and age/sandbox|year=1993|month=2|day=24|df=yes}} → " (1993-02-24) ২৪ ফেব্রুয়ারি ১৯৯৩ (বয়স ৩১)"
{{Birth date and age/sandbox|year=1993|month=2|day=24|mf=yes}} → " (1993-02-24) ফেব্রুয়ারি ২৪, ১৯৯৩ (বয়স ৩১)"
{{Birth date and age/sandbox|year=১৯৯৩|month=২|day=২৪}} → " (1993-02-24) ২৪ ফেব্রুয়ারি ১৯৯৩ (বয়স ৩১)"
{{Birth date and age/sandbox|year=১৯৯৩|month=২|day=২৪|df=yes}} → " (1993-02-24) ২৪ ফেব্রুয়ারি ১৯৯৩ (বয়স ৩১)"
{{Birth date and age/sandbox|year=১৯৯৩|month=২|day=২৪|mf=yes}} → " (1993-02-24) ফেব্রুয়ারি ২৪, ১৯৯৩ (বয়স ৩১)"
{{Birth date and age/sandbox|24 February 1993}} → " (1993-02-24) ২৪ ফেব্রুয়ারি ১৯৯৩ (বয়স ৩১)"
{{Birth date and age/sandbox|২৪ ফেব্রুয়ারি ১৯৯৩}} → " (1993-02-24) ২৪ ফেব্রুয়ারি ১৯৯৩ (বয়স ৩১)"

Template:Time interval সম্পাদনা

{{time interval|1 Jan 2001|March 4, 2002}} → ১ বছর, ২ মাস ও ৩ দিন
{{time interval|1 Jan 2001|March 4, 2002|abbr=on}} → ১ব ২মা ৩দি
{{time interval|B.C.E. 1 Feb 120|28 FEB 1900}} → ২০১৯ বছর ও ২৭ দিন
{{time interval|26 November 2018 19:52:59|show=d|disp=raw}} → ১৯৬৩
{{time interval|19 December 2018|show=ymd|sep=,}} → ৫ বছর, ৩ মাস, ২৩ দিন
{{time interval|1961|1989}} → ২৮ বছর
{{time interval|1961|1989|range=on}} → ২৭ বা ২৮ বছর
{{time interval|1961|1989|range=dash}} → ২৭–২৮ বছর
{{time interval|15 August 1989|disp=raw}} → ৩৪ ৭ ২৭
{{time interval|2001-01-01|2002-01-01|sep=comma|show=yd}} → ১ বছর, ০ দিন
{{time interval|2001-01-01|2002-01-01|show=yd}} → ১ বছর ও ০ দিন
{{time interval|2001-01-01|2002-01-02|show=yd}} → ১ বছর ও ১ দিন
{{time interval|15 August 1989}} → ৩৪ বছর, ৭ মাস ও ২৭ দিন
{{time interval|2010-04-08 20:43|2016-05-11 18:31|sc=y}} → ৬ বছর, ১ মাস, ও ২ দিন
{{time interval|2016-04-08 20:43|2016-05-11 18:31|abbr=on}} → ১মা ২দি
{{time interval|2016-04-08 20:43|2016-05-11 18:31|show=dhm|abbr=on}} → ৩২দি ২১ঘ ৪৮মি
{{time interval|28 July 1914|11 November 1918|round=weeks}} → ৪ বছর, ৩ মাস ও ২ সপ্তাহ

Most error messages সম্পাদনা

{{age in years and months|1990|7|20|1995|6|31}}ত্রুটি: দ্বিতীয় তারিখ বছর, মাস, দিন হওয়া উচিত
{{age in years and months|1995|2|29|1995|3|1}}ত্রুটি: বৈধ বছর, মাস, দিন প্রয়োজন
{{age in years|2005|2000}}ত্রুটি: দ্বিতীয় তারিখটি প্রথম তারিখের আগে হওয়া উচিত নয়
{{age in years|2005|2001}}ত্রুটি: দ্বিতীয় তারিখটি প্রথম তারিখের আগে হওয়া উচিত নয়
{{age|2000|junk}}ত্রুটি: দ্বিতীয় তারিখ বছর, মাস, দিন হওয়া উচিত
{{birth date and age/sandbox|1800|2|1}}ত্রুটি: বয়স গণনা করার জন্য জন্ম তারিখ অবৈধ
{{birth date and age/sandbox|2001||1}}ত্রুটি: বৈধ জন্ম তারিখ প্রয়োজন: বছর, মাস, দিন
{{death date and age/sandbox|1951|4|1|1800|4|1}}ত্রুটি: বয়স গণনা করার জন্য তারিখগুলি অবৈধ
{{death date and age/sandbox|2000|4|1|1800|4|2}}ত্রুটি: বয়স গণনা করার জন্য তারিখগুলি অবৈধ
{{death date and age/sandbox|2000|4|1|2000|4|2}}ত্রুটি: মৃত্যু তারিখ (প্রথম তারিখ) অবশ্যই জন্ম তারিখের (দ্বিতীয় তারিখ) পরে হতে হবে
{{death date and age/sandbox|2000|4|29|2000|4|30}}ত্রুটি: মৃত্যু তারিখ (প্রথম তারিখ) অবশ্যই জন্ম তারিখের (দ্বিতীয় তারিখ) পরে হতে হবে
{{death date and age/sandbox|2005|4|12|2000|4|31}}ত্রুটি: বৈধ জন্ম তারিখ (দ্বিতীয় তারিখ) প্রয়োজন: বছর, মাস, দিন
{{death date and age/sandbox|2005|4|31|2000|4|30}}ত্রুটি: বৈধ মৃত্যুর তারিখ (প্রথম তারিখ) প্রয়োজন: বছর, মাস, দিন
{{death date and age/sandbox|2005|4|31|2000|4|30}}ত্রুটি: বৈধ মৃত্যুর তারিখ (প্রথম তারিখ) প্রয়োজন: বছর, মাস, দিন
{{time interval|1 Jan 2001|1 Jan 2001|show=hm|round=days}}ত্রুটি: show=hm প্যারামিটার round=days-এর সাথে সঙ্ঘাত ঘটাচ্ছে
{{time interval|1 Jan 2001|3 Apr 2002|show=hm|abbr=bad}}ত্রুটি: প্যারামিটার abbr=bad অবৈধ
{{time interval|2001-02-00|2003-04-11}}ত্রুটি: প্রথম প্যারামিটারে শুরুর তারিখ অবৈধ

Error সম্পাদনা

@Johnuniq: I think I found an error here:

{{age|1989|7|0|2003|7|14}} gives ১৪; {{age|1989|0|0|2003|7|14}} gives ১৪; {{age|1989|7|0|2003|12|0}} gives ১৪; {{age|1989|0|0|2003|0|0}} gives ১৪

but

{{age|১৯৮৯|৭|০|২০০৩|৭|১৪}} gives ১৪; {{age|১৯৮৯|০|০|২০০৩|৭|১৪}} gives ১৪; {{age|১৯৮৯|৭|০|২০০৩|১২|০}} gives ১৪; {{age|১৯৮৯|০|০|২০০৩|০|০}} gives ১৪ (Error: Valid year, month, day required)

although (zero in english)

{{age|১৯৮৯|৭|0|২০০৩|৭|১৪}} gives ১৪; {{age|১৯৮৯|0|0|২০০৩|৭|১৪}} gives ১৪; {{age|১৯৮৯|৭|0|২০০৩|১২|0}} gives ১৪; {{age|১৯৮৯|0|0|২০০৩|0|0}} gives ১৪

--আফতাবুজ্জামান (আলাপ) ২৩:০৬, ২৮ ফেব্রুয়ারি ২০১৯ (ইউটিসি)উত্তর দিন

That was an interesting problem but it's fixed now. Johnuniq (আলাপ) ০৯:০১, ১ মার্চ ২০১৯ (ইউটিসি)উত্তর দিন

নিজের মনে রাখার জন্য সম্পাদনা

sortkey ইংরেজি করতে এটা ব্যবহার করা যায় (local spanMarker)। -- আফতাবুজ্জামান (আলাপ) ০২:৪৮, ২১ এপ্রিল ২০২১ (ইউটিসি)উত্তর দিন

"বয়স" পাতায় ফেরত যান।