Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tinydate

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tinydate

A tiny (349B) reusable date formatter. Extremely fast!

  • 1.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is tinydate?

tinydate is a small and efficient date formatting library for JavaScript. It allows you to format dates using a simple and intuitive syntax.

What are tinydate's main functionalities?

Basic Date Formatting

This feature allows you to format dates using a template string. The placeholders {YYYY}, {MM}, and {DD} are replaced with the corresponding parts of the date.

const tinydate = require('tinydate');
const format = tinydate('{YYYY}-{MM}-{DD}');
console.log(format(new Date())); // Outputs: 2023-10-05

Custom Date Formatting

This feature allows you to create custom date formats by combining different placeholders. You can format the time and date in a more readable way.

const tinydate = require('tinydate');
const format = tinydate('{HH}:{mm}:{ss} on {MMMM} {DD}, {YYYY}');
console.log(format(new Date())); // Outputs: 14:30:00 on October 05, 2023

Short Date Formatting

This feature allows you to format dates in a short format using two-digit year, month, and day placeholders.

const tinydate = require('tinydate');
const format = tinydate('{M}/{D}/{YY}');
console.log(format(new Date())); // Outputs: 10/5/23

Other packages similar to tinydate

Keywords

FAQs

Package last updated on 29 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc