Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Calculate the epidemiological week for any given date.
CoffeeScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
README.md
index.coffee
index.js
package.json

README.md

epi-week

A tiny module to calculate the epidemiological week (also known as "epi week" or "CDC week") for any given date.

Usage

var epi = require('epi-week');
epi(new Date(2012, 11, 29)); // returns { week: 52, year: 2012 }
epi(new Date(2012, 11, 30)); // returns { week: 1, year: 2013 }
epi(new Date(2015, 0, 1)); // returns { week: 53, year: 2014 }

Installation

$ npm install epi-week

Development

Caveat

This package is in its infancy, use with caution.

Something went wrong with that request. Please try again.