public
Fork of Caged/gitnub
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/benstiglitz/gitnub.git
Search Repo:
Caged (author)
Sun Mar 16 02:21:46 -0700 2008
commit  66e4e62e96cb85bebafa075b6e65e5a64bebb543
tree    109f6de016526805fd01d1c4556fa3e5cc8eb31a
parent  b4da17cd0588d92d01e3c04f377f23a17aecd288
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