public
Description: A Gitk-like application written in RubyCocoa that looks like it belongs on a Mac. See the wiki for downloads and screenshots.
Homepage: http://alternateidea.com
Clone URL: git://github.com/Caged/gitnub.git
Click here to lend your support to: gitnub and make a donation at www.pledgie.com !
Caged (author)
Sat Apr 12 21:28:50 -0700 2008
commit  596435407c1f88e809816cd40e3c19ab6db7ea52
tree    c9984b09a26126f940a134281950a578fdac79e9
parent  05a6b82844fe45353d4a9fe627d12d35cafc6d5f
gitnub / lib / time_extensions.rb
100644 14 lines (14 sloc) 0.445 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class Time
  def to_system_time(style = :full)
    formatter = OSX::NSDateFormatter.alloc.init
    case style
      when :full
        formatter.dateStyle = OSX::NSDateFormatterMediumStyle
        formatter.timeStyle = OSX::NSDateFormatterShortStyle
      when :time
        formatter.dateStyle = OSX::NSDateFormatterNoStyle
        formatter.timeStyle = OSX::NSDateFormatterShortStyle
    end
    formatter.stringFromDate(self.to_ns)
  end
end