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

ephemeral

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

ephemeral

Formatting dates with English prepositions & holiday names

  • 0.0.6
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Ephemeral

Formatting dates with English prepositions & holiday names

Installation

npm install ephemeral

Testing

npm test

Example Usage

var Ephemeral = require('ephemeral');

var ephemeral = Ephemeral(new Date);

var formattedDate = ephemeral.formattedDateWithPreposition('DDDo');

var sentence = 'This post was written '.concat(formattedDate);

console.info(sentence);
// -> 'This post was written on the 27th'

Available Methods

  • date()
    • -> 'on January 27, 2020'
    • -> 'on Independence Day'
  • day()
    • -> 'on Monday'
  • year()
    • -> 'in 2020'
  • month()
    • -> 'in January'
  • dayOrdinal()
    • -> 'on the 27th'
  • formattedDateWithPreposition('MMMM YYYY')
    • -> 'in January 2020'

Keywords

FAQs

Package last updated on 30 Jan 2014

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