বিষয়বস্তুতে চলুন

ব্যবহারকারী:ARI

পাতাটির বিষয়বস্তু অন্যান্য ভাষায় নেই।
উইকিউক্তি, মুক্ত উক্তি-উদ্ধৃতির সংকলন থেকে

ARI

Open Knowledge Enthusiast

ARI
Edit · Revert · Translate · Localize.
Building the history of human knowledge.
Joined: 2024
Status: Active
Primary: bnwiki
Mode: Localize
Find me
Talk
🌐︎Global
ARI  ·  USER PROFILE  ·  WIKI

ARI

Open Knowledge Enthusiast

ARI
Edit · Revert · Translate · Localize.
Building the history of human knowledge.
Joined: Loading...
Status: Active
Primary: bnwiki
Mode: Localize
Find me
Talk
🌐︎Global
ARI  ·  USER PROFILE  ·  WIKI

<script> (function () {

   function timeAgo(dateString) {
       const now = new Date();
       const then = new Date(dateString);
       let years = now.getFullYear() - then.getFullYear();
       let months = now.getMonth() - then.getMonth();
       if (months < 0) {
           years--;
           months += 12;
       }
       if (years > 0) {
           return years + " year" + (years > 1 ? "s" : "") +
               (months ? ", " + months + " month" + (months > 1 ? "s" : "") : "");
       }
       return months + " month" + (months !== 1 ? "s" : "");
   }
   const username = 'ARI';
   new mw.Api().get({
       action: 'query',
       list: 'usercontribs',
       ucuser: username,
       uclimit: 1,
       ucdir: 'newer',
       format: 'json'
   }).done(function (data) {
       const contribs = data.query.usercontribs;
       if (!contribs.length) {
           $('.wiki-joined').text('Not active here');
           return;
       }
       const firstEdit = contribs[0].timestamp;
       $('.wiki-joined').text(
           timeAgo(firstEdit)
       );
   });

})(); </script>