Sha256: 26ab0d9d8f9f9d1fff8a38c5bbc99190ea8f24dc1f056cf3454dd98fdb699f08

Contents?: true

Size: 261 Bytes

Versions: 56

Compression:

Stored size: 261 Bytes

Contents

class NSNumber

  def nsdate
    NSDate.dateWithTimeIntervalSince1970(self)
  end

  def before(date)
    date - self
  end

  def ago
    self.before(NSDate.new)
  end

  def after(date)
    date + self
  end

  def hence
    self.after(NSDate.new)
  end

end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
sugarcube-3.0.4 lib/cocoa/sugarcube-nsdate/nsnumber.rb
sugarcube-3.0.3 lib/cocoa/sugarcube-nsdate/nsnumber.rb
sugarcube-3.0.2 lib/cocoa/sugarcube-nsdate/nsnumber.rb
sugarcube-3.0.1 lib/cocoa/sugarcube-nsdate/nsnumber.rb
sugarcube-3.0.0 lib/cocoa/sugarcube-nsdate/nsnumber.rb
sugarcube-2.12.3 lib/cocoa/sugarcube-nsdate/nsnumber.rb
sugarcube-2.12.2 lib/cocoa/sugarcube-nsdate/nsnumber.rb
sugarcube-2.12.1 lib/cocoa/sugarcube-nsdate/nsnumber.rb
sugarcube-2.12.0 lib/cocoa/sugarcube-nsdate/nsnumber.rb
sugarcube-2.11.1 lib/cocoa/sugarcube-nsdate/nsnumber.rb
sugarcube-2.11.0 lib/cocoa/sugarcube-nsdate/nsnumber.rb
sugarcube-2.10.0 lib/cocoa/sugarcube-nsdate/nsnumber.rb
sugarcube-2.9.1 lib/cocoa/sugarcube-nsdate/nsnumber.rb
sugarcube-2.8.2 lib/cocoa/sugarcube-nsdate/nsnumber.rb
sugarcube-2.8.1 lib/cocoa/sugarcube-nsdate/nsnumber.rb
sugarcube-2.8.0 lib/cocoa/sugarcube-nsdate/nsnumber.rb
sugarcube-2.7.1 lib/cocoa/sugarcube-nsdate/nsnumber.rb
sugarcube-2.7.0 lib/cocoa/sugarcube-nsdate/nsnumber.rb
sugarcube-2.6.0 lib/cocoa/sugarcube-nsdate/nsnumber.rb
sugarcube-2.5.0 lib/cocoa/sugarcube-nsdate/nsnumber.rb