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

simpletime

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simpletime

Convert and manipulate various time formats..

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
32
increased by966.67%
Maintainers
1
Weekly downloads
 
Created
Source

simpletime

(c)Bumblehead

npm version Build Status

simpletime manages dates and renders them to unicode formats. (i18n through worldtime).

  • formats and extracts dates with unicode forms
  • uses YMDArr objects to simplify time manipulation
  • does not depend on a library
simpletime.extractDateFormatted(
  'April 5, 2013 9:23:41 pm 420',
  'MMMM d, y h:mm:ss a z'
);
// Fri Apr 05 2013 21:23:41 GMT-0700 (PDT)

simpletime.applyFormatDate(
  new Date('Fri Apr 05 2013 21:23:41 GMT-0700 (PDT)'),
  'MMMM d, y h:mm:ss a z'
);
// 'April 5, 2013 9:23:41 pm 420'

simpletime.getElapsedTimeObj(
  new Date('Sun Apr 07 2013 18:08:45 GMT-0700 (PDT)'),
  new Date('Sun Apr 07 2013 23:59:59 GMT-0700 (PDT)')
);
// { ms: 0, sec: 14, min: 51, hour: 5, day: 0 }

functions

scrounge

Keywords

FAQs

Package last updated on 31 Jul 2023

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