Class: Blufin::DateTimeUtils
- Inherits:
-
Object
- Object
- Blufin::DateTimeUtils
- Defined in:
- lib/core/datetime_utils.rb
Class Method Summary collapse
-
.now(format = nil) ⇒ Object
Returns the current DateTime as string.
Class Method Details
.now(format = nil) ⇒ Object
Returns the current DateTime as string. Default format is: %d/%m/%Y %H:%M:%S
7 8 9 10 |
# File 'lib/core/datetime_utils.rb', line 7 def self.now(format = nil) format = '%Y/%m/%d %H:%M:%S' if format.nil? Time.now.strftime(format) end |