Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jacobbubu/firstlastweekday
Get the date of first/last weekday from a specified date
https://github.com/jacobbubu/firstlastweekday
Last synced: 14 days ago
JSON representation
Get the date of first/last weekday from a specified date
- Host: GitHub
- URL: https://github.com/jacobbubu/firstlastweekday
- Owner: jacobbubu
- Created: 2013-05-30T10:20:50.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-05-30T10:45:26.000Z (over 11 years ago)
- Last Synced: 2024-12-13T19:51:45.538Z (about 1 month ago)
- Language: CoffeeScript
- Size: 105 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# 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](http://www.iana.org/time-zones).
# Usage #
`npm install first-last-weekday`
``` Coffee
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](https://raw.github.com/michaelnisi/pushup/master/LICENSE)