JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 857
  • Score
    100M100P100Q140347F
  • License

Get week number of the current date/year or given valid `Date` string format

Package Exports

  • current-week-number

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (current-week-number) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Week number NPM version Build Status Coveralls datetime org

Get week number of the current date/year or given valid Date string format

Install Nodei.co stats

Install with npm

$ npm install current-week-number
$ npm test
$ week --help

Usage

var currentWeekNumber = require('current-week-number');

// june 27, 2014
currentWeekNumber()
//=> 26

currentWeekNumber('March 24, 2015')
//=> 13

currentWeekNumber('03/24/2016')
//=> 12, cuz' year is leap

currentWeekNumber('August 07, 2015')
//=> 32

currentWeekNumber('02/16/2015')
//=> 8

For more use-cases see tests

.currentWeekNumber

  • [date] {String} every valid Date-ish string format

CLI

  Get current week number of the current year or given date string format.

  Options
    --help                Show this help
    --version             Current version of package
    -f | --format         Valid date format string

  Usage
    week [date format]

  Examples
    week
    week "March 24, 2015"
    week "03/24/2016"

Authors & Contributors

Charlike Mike Reagent author tips

License MIT license

Copyright (c) 2014 Charlike Mike Reagent, contributors.
Released under the MIT license.