Skip to content
Tutorial emka
Menu
  • Home
  • Debian Linux
  • Ubuntu Linux
  • Red Hat Linux
Menu

Cara Menggunakan Package Tempo Javascript Mengolah Tanggal/Waktu dengan Mudah

Posted on February 24, 2024

Tempo adalah paket tanggal baru yang dirancang untuk menjadi kecil dan merupakan cara termudah untuk bekerja dengan tanggal di JavaScript dan TypeScript:

Tempo adalah perpustakaan baru dalam tradisi bangga dari perpustakaan tanggal dan waktu JavaScript. Terinspirasi oleh moment.js, day.js, dan date-fns, Tempo dibangun dari awal untuk menjadi sekecil dan semudah mungkin — termasuk dukungan utama untuk operasi zona waktu.

Ini mencakup koleksi utilitas untuk bekerja dengan objek Date bawaan JavaScript, seperti format dan parse:

import { format, parse } from "@formkit/tempo"

const readable = format(new Date(), "full"); // Sunday, February 18, 2024

parse(readable, "full"); // Date: 2024-02-18T07:00:00.000Z

Tempo dilengkapi dengan berbagai gaya format (mis., full dalam contoh sebelumnya) dan token untuk memformat tanggal dengan cara apa pun yang mungkin Anda butuhkan. Anda juga dapat menemukan sejumlah besar modifikasi dan dukungan zona waktu:

import { addDay, tzDate } from "@formkit/tempo"

// Tambah 1 hari
addDay("2013-03-15"); // 2013-03-16T07:00:00.000Z

// Menghasilkan tanggal pukul 12 siang 18 November 2013 di New York
tzDate("2013-11-18 12:00", "America/New_York")

Tempo terlihat mengesankan, menawarkan banyak fitur yang Anda butuhkan untuk bekerja dengan tanggal dan memiliki dokumentasi yang sangat baik seputar fungsionalitasnya; Anda dapat memulai dengan membaca dokumen di tempo.formkit.com. Kode sumber juga tersedia di GitHub di formkit/tempo.

Recent Posts

  • Is it Time to Replace Nano? Discover Fresh, the Terminal Text Editor You Actually Want to Use
  • How to Design a Services Like Google Ads
  • How to Fix 0x800ccc0b Outlook Error: Step-by-Step Guide for Beginners
  • How to Fix NVIDIA App Error on Windows 11: Simple Guide
  • How to Fix Excel Formula Errors: Quick Fixes for #NAME
  • How to Clear Copilot Memory in Windows 11 Step by Step
  • How to Show Battery Percentage on Windows 11
  • How to Fix VMSp Service Failed to Start on Windows 10/11
  • How to Fix Taskbar Icon Order in Windows 11/10
  • How to Disable Personalized Ads in Copilot on Windows 11
  • What is the Microsoft Teams Error “We Couldn’t Connect the Call” Error?
  • Why Does the VirtualBox System Service Terminate Unexpectedly? Here is the Full Definition
  • Why is Your Laptop Touchpad Overheating? Here are the Causes and Fixes
  • How to Disable All AI Features in Chrome Using Windows 11 Registry
  • How to Avoid Problematic Windows Updates: A Guide to System Stability
  • What is Microsoft Visual C++ Redistributable and How to Fix Common Errors?
  • What is the 99% Deletion Bug? Understanding and Fixing Windows 11 File Errors
  • How to Add a Password to WhatsApp for Extra Security
  • How to Recover Lost Windows Passwords with a Decryptor Tool
  • How to Fix Python Not Working in VS Code Terminal: A Troubleshooting Guide
  • Game File Verification Stuck at 0% or 99%: What is it and How to Fix the Progress Bar?
  • Why Does PowerPoint Underline Hyperlinks? Here is How to Remove Them
  • AI Bug Hunting with Semgrep
  • What is the Excel Power Query 0xc000026f Error?
  • How to Build Your Own Homelab AI Supercomputer 2026
  • Inilah Doods Viral: Pengertian, Bahaya, dan Kenapa Kalian Harus Ekstra Waspada!
  • Gini Caranya Ngebangun Bisnis AI yang Menguntungkan dalam 48 Jam Saja!
  • Pengertian “He is Risen” Adalah?
  • Inilah Rekomendasi HP Snapdragon Paling Murah dengan RAM 8 GB Terupdate April 2026
  • Inilah 12 Kampus Negeri di Jogja yang Jarang Diketahui, Ternyata Banyak yang Kasih Kuliah Gratis!
  • How to Use VoxCPM2: The Complete Tutorial for Professional Voice Cloning and AI Speech Generation
  • Complete tutorial for Creao AI: How to build smart AI agents that automate your daily tasks
  • How to Streamline Your Digital Workflow with TeraBox AI: A Complete Tutorial for Beginners
  • How to Run Google Gemma 4 Locally: A Beginner’s Guide to Tiny but Mighty AI Models
  • A Beginner Tutorial on Cloning Website Source Code Using ChatGPT and AI Logic Reconstruction
  • Apa itu Spear-Phishing via npm? Ini Pengertian dan Cara Kerjanya yang Makin Licin
  • Apa Itu Predator Spyware? Ini Pengertian dan Kontroversi Penghapusan Sanksinya
  • Mengenal Apa itu TONESHELL: Backdoor Berbahaya dari Kelompok Mustang Panda
  • Siapa itu Kelompok Hacker Silver Fox?
  • Apa itu CVE-2025-52691 SmarterMail? Celah Keamanan Paling Berbahaya Tahun 2025
©2026 Tutorial emka | Design: Newspaperly WordPress Theme