Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
current-week-number
Advanced tools
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 1,213 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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.