Browse files

Date/Time formatter script

  • Loading branch information...
1 parent e331633 commit d399ecee51270f957adf61b9f78972605f610578 @ErebusBat committed Dec 28, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 datetime_formatter.rb
View
6 datetime_formatter.rb
@@ -0,0 +1,6 @@
+#!/usr/bin/env ruby
+require 'Date'
+format = "%k:%M"
+format = ARGV[0].dup if ARGV.length > 0
+format.gsub!(/\\n/, "\n")
+puts DateTime.now.strftime(format).strip

0 comments on commit d399ece

Please sign in to comment.