Date

Use the date/time API with any of these names: Date, তারিখ, Tarikh. Create instances with new Date() / new তারিখ() / new Tarikh() and call the same operations by their English, Bangla, or Banglish forms.


Static Methods

  • Current timestamp: Date.now(), তারিখ.এখন(), Tarikh.ekhon()
  • Parse string: Date.parse(str), তারিখ.বিশ্লেষণ(str), Tarikh.bishleshon(str)
  • Build UTC: Date.UTC(y, m, d, h, M, s, ms), তারিখ.ইউটিসি(...), Tarikh.utc(...)

Instance Methods (Common)

  • Get parts: getFullYear() / getMonth() / getDate() → Bangla: বছর() / মাস() / তারিখ() · Banglish: bochor() / mas() / tarikh()
  • Set parts: setFullYear() / setMonth() / setDate() → Bangla: বছর_স্থাপন() / মাস_স্থাপন() / তারিখ_স্থাপন() · Banglish: bochorSthapon() / masSthapon() / tarikhSthapon()
  • Time value: getTime() / setTime() → Bangla: সময়() / সময়_স্থাপন() · Banglish: shomoy() / shomoySthapon()
  • Local/UTC: toLocaleString() / toUTCString() → Bangla: স্থানীয়_অক্ষরমালায়_রুপান্তর() / ইউটিসি_অক্ষরমালায়_রুপান্তর() · Banglish: sthaniyoOkkhoromalayRupantor() / utcOkkhoromalayRupantor()

Examples

const d = new তারিখ("2025-01-15T10:20:30Z");
কনসোল.লগ(d.বছর()); // 2025
কনসোল.লগ(তারিখ.এখন() > 0); // true

UTC Helpers

  • Read UTC parts: getUTCFullYear() / getUTCMonth() / getUTCDate() → Bangla: ইউটিসি_বছর() / ইউটিসি_মাস() / ইউটিসি_তারিখ() · Banglish: utcBochor() / utcMas() / utcTarikh()
  • Set UTC parts: setUTCFullYear() / setUTCMonth() / setUTCDate() → Bangla: ইউটিসি_বছর_স্থাপন() / ইউটিসি_মাস_স্থাপন() / ইউটিসি_তারিখ_স্থাপন() · Banglish: utcBochorSthapon() / utcMasSthapon() / utcTarikhSthapon()