Module: NBP::Commons
- Included in:
- ExchangeRate, XMLFilesList
- Defined in:
- lib/nbp/commons.rb
Constant Summary collapse
- CORE_WEB_PATH =
'http://www.nbp.pl/kursy/xml/'
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(base) ⇒ Object
4 5 6 |
# File 'lib/nbp/commons.rb', line 4 def self.extended(base) base.private_class_method :normalize_time_period end |
Instance Method Details
#nbp_date_format_hash(date) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/nbp/commons.rb', line 8 def nbp_date_format_hash(date) day = normalize_time_period date.day.to_s month = normalize_time_period date.month.to_s year = date.year.to_s[-2..-1] { day: day, month: month, year: year } end |