Project

week

0.0
No release in over 3 years
Low commit activity in last 3 years
Simple gem to work with weeks as arrays of date objects. Also include monkey patch for Date class. Cheers!
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

Build Status

Description:

A simple gem to work with weeks as arrays of date objects. It works with commercial dates (according to http://en.wikipedia.org/wiki/ISO_week_date).

Usage:

Simple:

week(2011, 52).map { |day| p day }

# =>
# Sun Dec 25 00:00:00 +0200 2011
# (...)
# Sat Dec 31 00:00:00 +0200 2011

Without any parameters:

week.map { |day| p day }

With Monday as first day of the week:
(1 as third parameter)

week(2011, 8, 1).map { |day| p day }

Patch for standart library Date class:

Date.new(2011, 12, 25).week

Copyright (c) 2011 Sergey Gerasimov