Socket
Socket
Sign inDemoInstall

cdate-locale

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cdate-locale

I18N display handlers for cdate


Version published
Weekly downloads
15
decreased by-6.25%
Maintainers
1
Install size
31.4 kB
Created
Weekly downloads
 

Readme

Source

cdate-locale - I18N display handlers for cdate

Node.js CI npm version

SYNOPSIS

// TypeScript, ESM
import {cdate} from "cdate";
import {locale_en} from "cdate-locale";

// CommonJS
const {cdate} = require("cdate");
const {locale_fr} = require("cdate-locale");
const {locale_de} = require("cdate-locale/locale/de.js");
cdate().handler(locale_en).format("MMMM")
// => 'December'

cdate().handler(locale_en).text("%c");
// => 'Mon, Dec 12, 2022, 7:26:12 PM'

cdate().handler(locale_fr).format("MMMM")
// => 'décembre'

cdate().handler(locale_fr).text("%c");
// => 'lun. 12 déc. 2022, 19:26:12'

cdate().handler(locale_de).format("MMMM")
// => 'Dezember'

cdate().handler(locale_de).text("%c");
// => Mo., 12. Dez. 2022, 19:26:12'

LOCALES

Keywords

FAQs

Last updated on 17 Dec 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc