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

d3-time-format

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-time-format

A JavaScript time formatter and parser inspired by strftime and strptime.

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.2M
increased by2.06%
Maintainers
1
Weekly downloads
 
Created

What is d3-time-format?

The d3-time-format package is a JavaScript library for parsing and formatting dates. It is part of the D3.js collection of tools for data visualization, but it can be used independently for dealing with date and time formatting. It provides a way to specify custom formats for dates and times, as well as parse strings into date objects based on these formats.

What are d3-time-format's main functionalities?

Formatting Dates

This feature allows you to format a JavaScript Date object into a string based on a specifier string. The specifier controls how various parts of the date are displayed.

"%Y-%m-%d".format(new Date())

Parsing Dates

This feature enables you to parse a string representing a date into a JavaScript Date object using a format specifier that matches the format of the string.

d3.timeParse("%Y-%m-%d")("2023-04-01")

Locale Support

This feature allows you to use locale-specific date and time formatting. You can define your own locale with custom time formatting symbols, or use predefined locales.

d3.timeFormatLocale(locale).format("%c")(new Date())

Other packages similar to d3-time-format

Keywords

FAQs

Package last updated on 22 Jun 2016

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