Socket
Socket
Sign inDemoInstall

simpletime

Package Overview
Dependencies
0
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    simpletime

Convert and manipulate various time formats..


Version published
Maintainers
1
Created

Readme

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

Last updated on 31 Jul 2023

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