Skip to main content

Welcome to PlatziDate

A simple, lightweight utility for handling dates in JavaScript. Get timestamps and beautifully formatted dates with multi-locale support.

Example

Key Features

Everything you need for date handling in JavaScript

Lightweight

Zero dependencies. Just simple, pure JavaScript that works anywhere.

Multi-locale

Support for multiple locales with default Spanish (es-ES) formatting.

Easy to use

Two simple functions: get timestamps or formatted dates. That’s it.

CommonJS

Works with Node.js and any CommonJS-compatible environment.

Quick Start

Get up and running in less than a minute

1

Install the package

Install PlatziDate using npm:
npm install platzidate
2

Import and use

Require the module and start using it immediately:
const platzidate = require('platzidate');

// Get current timestamp
const timestamp = platzidate.getTimestamp();
console.log(timestamp); // 1709572800000

// Get formatted date
const formattedDate = platzidate.getLongTime();
console.log(formattedDate); 
// "lunes, 4 de marzo de 2024, 12:00:00 GMT"
3

Customize locale

Use different locales for international date formatting:
// English (US)
const usDate = platzidate.getLongTime('en-US');
// "Monday, March 4, 2024, 12:00:00 PM GMT"

// French
const frDate = platzidate.getLongTime('fr-FR');
// "lundi 4 mars 2024, 12:00:00 UTC"

Explore the Documentation

Learn more about what PlatziDate can do

Installation

Detailed installation instructions and setup guide

Quickstart

Get started with PlatziDate in minutes

API Reference

Complete API documentation for all functions

Localization Guide

Learn how to use different locales

Ready to get started?

Install PlatziDate and start handling dates with ease in your JavaScript projects.

Get Started Now

Build docs developers (and LLMs) love