first-last-weekday

0.0.3 • Public • Published

Overview

This module provides a tool to get the date of first or last weekday from a specified date.

I use it to parse the Olson Timezone Rule File.

Usage

npm install first-last-weekday

firstLastWeekDay = require './lib/index'
 
d = new Date('2013-05-30')
 
# firstSun ~ firstSat
console.log 'firstSun',  firstLastWeekDay.firstSun(d).toDateString()
 
# lastSun ~ lastSat
console.log 'lastSun',  firstLastWeekDay.lastSun(d).toDateString()
 

result:

firstSun Sun Jun 02 2013
lastSun Sun May 26 2013

Code written in Coffee-Script then compiled by grunt.

License

MIT License

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    0
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i first-last-weekday

Weekly Downloads

0

Version

0.0.3

License

MIT

Last publish

Collaborators

  • jacobbubu