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

Comparing version 0.1.24 to 0.1.25

2

package.json
{
"name": "simpletime",
"version": "0.1.24",
"version": "0.1.25",
"main": "simpletime",

@@ -5,0 +5,0 @@ "license" : "MIT",

@@ -5,10 +5,30 @@ simpleTime

### overview
simpletime manipulates dates and converts them to unicode formats. (supports i18n through [worldtime][1]).
simpletime functions manipulatie dates and convert dates to and from unicode format. i18n unsupported ([worldtime][1]).
* format and unformat dates using unicode [forms][2]
* create and use `YMDArr` objects to simplify time manipulation
* formats and extracts dates with unicode [forms][2]
* uses `YMDArr` objects to simplify time manipulation
* does not depend on a library
```javascript
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 }
```
[0]: http://www.bumblehead.com "bumblehead"

@@ -15,0 +35,0 @@ [1]: http://github.com/iambumblehead/worldtime "worldtime"

// Filename: simpletime.js
// Timestamp: 2016.01.07-22:38:57 (last modified)
// Author(s): Bumblehead (www.bumblehead.com)
//
//

@@ -6,0 +5,0 @@ // parts of this based on work found in comp.lang.javascript faq

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