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.



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

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

Instance Attribute Details

#dtObject

Returns the value of attribute dt.



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

def dt
  @dt
end

#tObject

Returns the value of attribute t.



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

def t
  @t
end

Instance Method Details

#monthObject



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

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

#monthonlyObject



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

def monthonly
  @t.month
end

#weekObject



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

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

#weekonlyObject



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

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

#yearObject



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

def year
  @t.year
end

#year_staticObject



87
88
89
# File 'lib/sisu/se_date.rb', line 87

def year_static
  YEAR
end