Security News
OpenJS: “XZ Utils Cyberattack Likely Not an Isolated Incident”
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.
current-week-number
Advanced tools
Weekly downloads
Readme
Get current week number of the current year,given Date format string or Date object.
npm i --save current-week-number
npm test
current-week-number --help
For more use-cases see the tests
Get week number of the current date/year or given valid
Date
string format
[date]
{String} every valid Date-ish string formatreturn
{Number}Example:
var currentWeekNumber = require('current-week-number');
// june 27, 2014
currentWeekNumber();
//=> 26
currentWeekNumber('March 24, 2015');
//=> 13
currentWeekNumber(new Date('March 24, 2015'));
//=> 13
currentWeekNumber('03/24/2016');
//=> 12, cuz' year is leap
currentWeekNumber('August 07, 2015');
//=> 32
currentWeekNumber(new Date('August 07, 2016'));
//=> 31
currentWeekNumber('02/16/2015');
//=> 8
currentWeekNumber('September 15, 2126');
//=> 37
currentWeekNumber('02/17/2012');
//=> 7
You can just run
current-week-number --help
for more information
Charlike Mike Reagent
Copyright (c) 2014-2015 Charlike Mike Reagent, contributors.
Released under the MIT
license.
Powered and automated by kdf, March 02, 2015
FAQs
Get current week number of the current year,given Date format string or Date object.
The npm package current-week-number receives a total of 2,287 weekly downloads. As such, current-week-number popularity was classified as popular.
We found that current-week-number demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
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.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.
Company News
Come meet the Socket team at BSidesSF and RSA! We're sponsoring several fun networking events and we would love to see you there.
Security News
OSI is starting a conversation aimed at removing the excuse of the SaaS loophole for companies navigating licensing and the complexities of doing business with open source.