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

  • How to build a high-performance private photo cloud with Immich and TrueNAS SCALE
  • How to Build an Endgame Local AI Agent Setup Using an 8-Node NVIDIA Cluster with 1TB Memory
  • How to Master Windows Event Logs to Level Up Your Cybersecurity Investigations and SOC Career
  • How to Build Ultra-Resilient Databases with Amazon Aurora Global Database and RDS Proxy for Maximum Uptime and Performance
  • How to Build Real-Time Personalization Systems Using AWS Agentic AI to Make Every User Feel Special
  • How to Transform Your Windows 11 Interface into a Sleek and Modern Aesthetic Masterpiece
  • How to Understand Google’s New TPU 8 Series for Massive AI Training and Inference
  • How to Level Up Your PC Gaming Experience with the New Valve Steam Controller and Its Advanced Features
  • 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
  • Daftar Sekarang! Beasiswa S2 di Italia dari IYT Scholarship 2026 Sudah Dibuka
  • Sejarah Hantavirus dan Perkembangannya Sampai ke Indonesia
  • Kementerian Pendidikan: Mapel Bahasa Inggris Wajib di SD Mulai 2027!
  • Ketua Fraksi PKB MPR-RI: Kemenag Respon Cepat Pendidikan Santri Ndolo Kusumo Pati yang Terdampak
  • Viral Video Sejoli Di Balai Kota Panggul Trenggalek, Satpol PP Janji Usut
  • Testing Baidu Ernie 5.1, ultra-efficient thinking mode to solve your most complex coding and reasoning challenges with ease
  • How to Evaluate AI Logic Performance Using DeepSeek V4 Flash Think and Gemini 3.1 Flash Light in Complex Reasoning Tests
  • How to Build Your Own Content Factory Using the New Google NotebookLM Intelligence Updates
  • How to Use DFlash for Blazing Fast AI Text Generation on Gemma 4 26B
  • How to Optimize Your AI Agent Using Compiled Knowledge Layers to Replace Traditional RAG Systems
  • 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