Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

first-last-weekday

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

first-last-weekday

Get the date of first/last weekday from a specified date

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 31 May 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc