Comparing version 0.1.6 to 0.1.7
{ | ||
"name": "instadate", | ||
"version": "0.1.6", | ||
"description": "", | ||
"version": "0.1.7", | ||
"description": "A minimal high performance date library for Node.js and Browser", | ||
"main": "instadate.js", | ||
"files": [ | ||
"instadate.js" | ||
], | ||
"scripts": { | ||
@@ -13,3 +16,3 @@ "test": "node test/main.js | faucet" | ||
}, | ||
"author": "", | ||
"author": "Serge Herkül @ Teamweek", | ||
"license": "ISC", | ||
@@ -16,0 +19,0 @@ "bugs": { |
@@ -22,5 +22,5 @@ # Instadate | ||
Current popular date libraries put a lot of effort into doing a lot of things correctly. Instadate on the other hand only has a handful of features that are all geared towards performance. Instadate is more of a wrapper around the native JavaScript Date than a full on date library. | ||
Current popular date libraries put a lot of effort into doing a lot causing them to lose a lot of performance because of heavy abstractions. Instadate on the other hand only has a handful of features that are all geared towards performance. Instadate is more of a wrapper around the native JavaScript Date than a full on date library. | ||
Use Instadate when you need to run thousands of date manipulations or comparisons per second . | ||
Use Instadate when you need to run thousands of date manipulations or comparisons per second. Instadate is managed and used by [Teamweek](https://teamweek.com/) team calendar. | ||
@@ -32,9 +32,2 @@ **Instadate..** | ||
## Testing | ||
``` | ||
npm test | ||
``` | ||
**NB! Documentation is a WIP, look at source for all functions** | ||
## API Reference | ||
@@ -58,9 +51,13 @@ | ||
**`differenceInDays(from, to)`** | ||
**`differenceInMinutes(from, to)`** | ||
Returns the difference in days (24 hour periods) between two dates. Returned result can be negative. | ||
Returns the difference in minutes (60 second periods) between two dates. Returned result can be negative. | ||
**`differenceInSeconds(from, to)`** | ||
Returns the difference in seconds (1000 milisecond periods) between two dates. Returned result can be negative. | ||
**`differenceInWeekendDays(from, to)`** | ||
Returns the difference in days (24 hour periods) between two dates. Excludes weekend days. Returned result can be negative. | ||
Returns the difference in days (24 hour periods) between two dates. Excludes work days. Returned result can be negative. | ||
@@ -157,3 +154,3 @@ **`differenceInWorkDays(from, to)`** | ||
Sets the given days (0-6) as weekend days. Any day not in the array will be set as a work day. | ||
Sets the given days (array containing integers from 0 to 6) as weekend days. Any day not in the array will be set as a work day. After the weekend days are set all Instadate functions will use the new work and weekend days. | ||
@@ -215,1 +212,6 @@ **`daysInPeriod(firstDay, length, daysArray)`** | ||
Converts day (0-6) to iso day (1-7). | ||
## Testing | ||
``` | ||
npm test | ||
``` |
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
1
213
12798
3
216