# Calculate the financial year, with the supplied date
  def get_financial_year(opts={})
    date = opts[:date].is_a?(Date)? opts[:date] : Time.now.to_date
...

Ruby Getting financial year

by https://www.google.com/accounts/o8/id?id=AItOawkXhagloEt9LaGYb5TnfYmraHmMC8fzlsE, March 12, 2012 22:47, 6 refactorings, tagged with rails, ruby, date

I'm trying to get the finan...

6b0e4504e14e6b9e239ffd1dc20f301c Talk
#MM-YYYY
"2011-10".split("-").reverse.join("/") => "10/2011"

Ruby parsing date

by RoadHouse, November 24, 2011 12:40, 3 refactorings, tagged with ruby, date

anyone has the better solut...

70089e712ed13abb99bec89bd5bfba77 Talk
def self.at_beginning_of_interval(time, interval_type)
      #simple substraction does not (seem) to work for long intervals (summer/winter time ?)
      #and at_beginning_of_hour is not defined
...

Ruby At beginning of interval

by pragmatig, May 24, 2009 18:33, 1 refactoring, tagged with time, ruby, date

This code was necessary sin...

4fc8066b5aeba133f665ec8f30f92a9c Talk
def first_day_of_month(selected_date)
...

Ruby Splitting array into define...

by Bonobo, March 25, 2009 14:04, 4 refactorings, tagged with ruby, date, arrays, split, calendar

I'm mainly interested in op...

4e0322e79d041875f3ef7db64e2d5b18 Talk
def date(date, time = false)
    date = Date.parse(date) if date.is_a? String
    day = date.strftime('%d')
...

Ruby Human Date Method

by bazookaaa.myopenid.com, July 05, 2008 07:51, 6 refactorings, tagged with time, date

Seems like this method coul...

75fce382ae1f51533ea890ef92dcb47b Talk
class Article < ActiveRecord::Base

  # Find all articles in the given date range based on the published_at field
...

Ruby Building a dynamic date range

by claytonlz, May 08, 2008 23:45, 2 refactorings, tagged with date range, date

I've got a route that handl...

E17d936d4535519716b6e810052feac5 Talk