Skip to content

Regarding “time_difference" #22

Description

@Giriraj24

Hi Lee,

I hope you are doing great.

I needed small help regarding: https://rubygems.org/gems/time_difference/versions/0.4.2

I was trying to use “time_difference” in my ruby script, however was getting below error:

ghe_premerge_onboard.rb:47:in block in <main>': uninitialized constant TimeDifference (NameError) from ghe_premerge_onboard.rb:41:ineach'
from ghe_premerge_onboard.rb:41:in `

Btw,

I added following require statement in my ruby script:

require ‘time_difference’

But it throws the error for that as well? Is that correct require statement to use it in ruby script?

Also I was trying to use following way:

pom_repo.each do |repos|
commit_date = client.repository("#{orgname}/#{repos}").pushed_at
date_now = Time.now
today_date = date_now.utc
puts TimeDifference.between(commit_date, today_date).in_months
end

Please help

Thanks,
Giriraj

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions