0.0.3 • Published 12 years ago

first-last-weekday v0.0.3

Weekly downloads
2
License
-
Repository
github
Last release
12 years ago

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

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago