data_calendar 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/data_calendar/data_calendar.rb +13 -0
- data/lib/data_calendar/version.rb +1 -1
- metadata +2 -2
@@ -10,6 +10,19 @@ class DataCalendar
|
|
10
10
|
[days_to_preview_month,days_to_current_month,days_to_next_month].flatten
|
11
11
|
end
|
12
12
|
|
13
|
+
|
14
|
+
# Return the days of the current week
|
15
|
+
def week
|
16
|
+
first_day_of_week = @date.monday
|
17
|
+
|
18
|
+
days_of_week = []
|
19
|
+
7.times do |time|
|
20
|
+
days_of_week << day_and_types(first_day_of_week + time.days)
|
21
|
+
end
|
22
|
+
|
23
|
+
days_of_week
|
24
|
+
end
|
25
|
+
|
13
26
|
def days_to_preview_month
|
14
27
|
fill_days = first_day_of_month.wday
|
15
28
|
fill_days = 7 if fill_days == 0
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: data_calendar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Jos\xC3\xA9 Galisteo Ruiz"
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-16 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|