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.
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
#dt ⇒ Object
Returns the value of attribute dt.
65 66 67 |
# File 'lib/sisu/se_date.rb', line 65 def dt @dt end |
#t ⇒ Object
Returns the value of attribute t.
65 66 67 |
# File 'lib/sisu/se_date.rb', line 65 def t @t end |
Instance Method Details
#month ⇒ Object
73 74 75 |
# File 'lib/sisu/se_date.rb', line 73 def month "#{@t.year}#{@t.month}" end |
#monthonly ⇒ Object
82 83 84 |
# File 'lib/sisu/se_date.rb', line 82 def monthonly @t.month end |
#week ⇒ Object
69 70 71 72 |
# File 'lib/sisu/se_date.rb', line 69 def week w=@t.strftime('%W') "#{@t.year}w#{w}" end |
#weekonly ⇒ Object
79 80 81 |
# File 'lib/sisu/se_date.rb', line 79 def weekonly @t.strftime('%W') end |
#year ⇒ Object
76 77 78 |
# File 'lib/sisu/se_date.rb', line 76 def year @t.year end |
#year_static ⇒ Object
85 86 87 |
# File 'lib/sisu/se_date.rb', line 85 def year_static YEAR end |