npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

copong-date

v3.2.0

Published

**Copong Date** adalah kumpulan utilitas tanggal dan waktu berbasis **TypeScript** yang dirancang khusus untuk mempermudah proses formatting, manipulasi, validasi, dan kalkulasi tanggal di aplikasi frontend modern seperti **React** dan **Next.js**.

Downloads

9

Readme

📅 Copong Date

Copong Date adalah kumpulan utilitas tanggal dan waktu berbasis TypeScript yang dirancang khusus untuk mempermudah proses formatting, manipulasi, validasi, dan kalkulasi tanggal di aplikasi frontend modern seperti React dan Next.js.

Library ini cocok digunakan di proyek frontend dengan dukungan untuk format waktu lokal (WIB) maupun zona waktu UTC.


🔧 Ringan & Modular

Copong Date dibangun dengan pendekatan modular, tanpa dependensi berat, dan dapat langsung digunakan tanpa konfigurasi tambahan.


✨ Fitur Utama

🔄 Konversi & Format

  • Konversi tanggal lokal ke format ISO dan sebaliknya
  • Menggabungkan tanggal dan waktu menjadi format ISO
  • Format tanggal lengkap dalam bahasa Indonesia (contoh: 12 Juni 2025)

📅 Kalkulasi & Validasi

  • Menentukan awal (Senin) dan akhir (Minggu) dari minggu berdasarkan tanggal
  • Menghitung selisih hari, minggu, atau tahun
  • Validasi apakah tanggal adalah Sabtu/Minggu atau hari ini

🕧 Zona Waktu & Relatif

  • Konversi tanggal dari dan ke zona waktu WIB ↔ UTC
  • Menampilkan waktu relatif dari sekarang (misalnya: 3 hari yang lalu, 2 jam lagi)

💡 Dibangun Menggunakan

  • ⚙️ TypeScript untuk fleksibilitas tinggi
  • 📦 Day.js v1.11.13 (terinstall secara default) Digunakan untuk parsing dan validasi tanggal ringan, dengan API yang kompatibel dengan Moment.js

📌 Contoh Penggunaan


import {
  ApakahHariIni,
  HitungSelisihHari,
  HitungMingguPertahun,
  InputJamMenit,
  InputNamaBulanTahun,
  InputNumberTahunBulanJamMenitZ,
  InputTahun,
  InputTahunBulan,
  InputTahunBulanHariJamMenit,
  InputTahunBulanTanggalMinusTujuh,
  InputTahunBulanTanggalPlusTujuh,
  IsSabtuMinggu,
} from "copong-date";

export default function Home() {
  const [date, setDate] = useState<string>("")

  return (
    <>

    <p>{date}<p/>

      <input
        type="date"
        onChange={(e) => {
          setDate(ApakahHariIni(e.target.value));
          console.log(ApakahHariIni(e.target.value));
          console.log(HitungMingguPertahun(e.target.value));
          console.log(HitungSelisihHari(e.target.value, e.target.value));
          console.log(InputJamMenit(e.target.value));
          console.log(InputNamaBulanTahun(e.target.value));
          console.log(InputNumberTahunBulanJamMenitZ(e.target.value));
          console.log(InputTahun(e.target.value));
          console.log(InputTahunBulan(e.target.value));
          console.log(InputTahunBulanHariJamMenit(e.target.value));
          console.log(InputTahunBulanTanggalMinusTujuh(e.target.value));
          console.log(InputTahunBulanTanggalPlusTujuh(e.target.value));
          console.log(IsSabtuMinggu(e.target.value));
        }}
      />
    </>
  );
}

semoga membantu brohhhhhhh