Class: SiSU_Info_Date::InfoDate

Inherits:
Object
  • Object
show all
Defined in:
lib/sisu/se_date.rb

Direct Known Subclasses

SiSU_Env::InfoDate

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeInfoDate

Returns a new instance of InfoDate.



66
67
68
# File 'lib/sisu/se_date.rb', line 66

def initialize
  @dt,@t=Date.today.to_s,Time.now
end

Instance Attribute Details

#dtObject

Returns the value of attribute dt.



65
66
67
# File 'lib/sisu/se_date.rb', line 65

def dt
  @dt
end

#tObject

Returns the value of attribute t.



65
66
67
# File 'lib/sisu/se_date.rb', line 65

def t
  @t
end

Instance Method Details

#monthObject



73
74
75
# File 'lib/sisu/se_date.rb', line 73

def month
  "#{@t.year}#{@t.month}"
end

#monthonlyObject



82
83
84
# File 'lib/sisu/se_date.rb', line 82

def monthonly
  @t.month
end

#weekObject



69
70
71
72
# File 'lib/sisu/se_date.rb', line 69

def week
  w=@t.strftime('%W')
  "#{@t.year}w#{w}"
end

#weekonlyObject



79
80
81
# File 'lib/sisu/se_date.rb', line 79

def weekonly
  @t.strftime('%W')
end

#yearObject



76
77
78
# File 'lib/sisu/se_date.rb', line 76

def year
  @t.year
end

#year_staticObject



85
86
87
# File 'lib/sisu/se_date.rb', line 85

def year_static
  YEAR
end