lib/pyk/date_time.rb in pyk-0.0.1 vs lib/pyk/date_time.rb in pyk-0.0.2
- old
+ new
@@ -1,6 +1,11 @@
class Pyk::DateTime
+ #Pyk::DateTime.end_of_day(date_object)
+ def self.end_of_day(date_object)
+ Date.new(date_object.year, date_object.month, date_object.day).to_time + 86340
+ end
+
#Pyk::Date.get_start_date_from_tag(tag, default_year=nil, default_month=nil)
def self.get_start_date_from_tag(tag, default_year=nil, default_month=nil)
if tag == "this_month"
return Date.new(Time.now.strftime("%Y").to_i, Time.now.strftime("%m").to_i, 1).to_time
elsif tag == "last_30"
\ No newline at end of file