Sha256: 6466559f402437d68eebf9f5ec0bb03c72bbb02add04c16ec8ecee1fb7d428c0
Contents?: true
Size: 636 Bytes
Versions: 28
Compression:
Stored size: 636 Bytes
Contents
class Pyk::Date #Pyk::Date.start_of_financial_year(d) def self.start_of_financial_year(d) Date.new((d.to_i - 1), 4, 1).to_time end #Pyk::Date.end_of_financial_year(d) def self.end_of_financial_year(d) Date.new(d.to_i, 3, 31).to_time + 86340 end #Pyk::Date.end_of_month(month, year) def self.end_of_month(month, year) Date.new(year, month, -1).to_time + 86340 end #Pyk::Date.next_month(month) def self.next_month(month) (month == 12) ? 1 : month + 1 end #Pyk::Date.year_next_month(month, year) def self.year_next_month(month, year) (month == 12) ? year + 1 : year end end
Version data entries
28 entries across 28 versions & 1 rubygems