Module: ParseCommitDate
- Extended by:
- ActiveSupport::Concern
- Included in:
- Projects::CommitsController, Projects::MergeRequestsController
- Defined in:
- app/controllers/concerns/parse_commit_date.rb
Instance Method Summary collapse
Instance Method Details
#convert_date_to_epoch(date) ⇒ Object
6 7 8 9 |
# File 'app/controllers/concerns/parse_commit_date.rb', line 6 def convert_date_to_epoch(date) Date.strptime(date, "%Y-%m-%d")&.to_time(:utc)&.to_i if date rescue Date::Error, TypeError end |