Class: SiSU_Info_Date::InfoDate
- Inherits:
-
Object
- Object
- SiSU_Info_Date::InfoDate
- Defined in:
- lib/sisu/se_date.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#dt ⇒ Object
Returns the value of attribute dt.
-
#t ⇒ Object
Returns the value of attribute t.
Instance Method Summary collapse
-
#initialize ⇒ InfoDate
constructor
A new instance of InfoDate.
- #month ⇒ Object
- #monthonly ⇒ Object
- #week ⇒ Object
- #weekonly ⇒ Object
- #year ⇒ Object
- #year_static ⇒ Object
Constructor Details
#initialize ⇒ InfoDate
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
#dt ⇒ Object
Returns the value of attribute dt.
67 68 69 |
# File 'lib/sisu/se_date.rb', line 67 def dt @dt end |
#t ⇒ Object
Returns the value of attribute t.
67 68 69 |
# File 'lib/sisu/se_date.rb', line 67 def t @t end |
Instance Method Details
#month ⇒ Object
75 76 77 |
# File 'lib/sisu/se_date.rb', line 75 def month "#{@t.year}#{@t.month}" end |
#monthonly ⇒ Object
84 85 86 |
# File 'lib/sisu/se_date.rb', line 84 def monthonly @t.month end |
#week ⇒ Object
71 72 73 74 |
# File 'lib/sisu/se_date.rb', line 71 def week w=@t.strftime('%W') "#{@t.year}w#{w}" end |
#weekonly ⇒ Object
81 82 83 |
# File 'lib/sisu/se_date.rb', line 81 def weekonly @t.strftime('%W') end |
#year ⇒ Object
78 79 80 |
# File 'lib/sisu/se_date.rb', line 78 def year @t.year end |
#year_static ⇒ Object
87 88 89 |
# File 'lib/sisu/se_date.rb', line 87 def year_static YEAR end |