Sha256: 62eca71f21f4085ad082d6253175da9bb77649096b53e86ca505cf4d164a136a

Contents?: true

Size: 778 Bytes

Versions: 18

Compression:

Stored size: 778 Bytes

Contents

module Aio::Base::Toolkit::Date
	class << self

		def month_to_i(str)
			return 	case str
							when /(?i)Jan/
								"01"
							when /(?i)Feb/
								"02"
							when /(?i)Mar/
								"03"
							when /(?i)Apr/
								"04"
							when /(?i)May/
								"05"
							when /(?i)Jun/
								"06"
							when /(?i)Jul/
								"07"
							when /(?i)Aug/
								"08"
							when /(?i)Sep/
								"09"
							when /(?i)Oct/
								"10"
							when /(?i)Nov/
								"11"
							when /(?i)Dec/
								"12"
							else
								"unknow"
							end
		end

		# arr = [time, zone, week, year, month, day]
		def time_to_s(arr)
			year 	= arr[3]
			month = arr[4]
			day 	= arr[5]
			time 	= arr[0]
			format("%s-%s-%s %s", year, month, day, time)
		end
			
	end # class self
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
aio_elin-1.1.8 lib/aio/base/toolkit/date.rb
aio_elin-1.1.7 lib/aio/base/toolkit/date.rb
aio_elin-1.1.4 lib/aio/base/toolkit/date.rb
aio_elin-1.1.3 lib/aio/base/toolkit/date.rb
aio_elin-1.1.2 lib/aio/base/toolkit/date.rb
aio_elin-1.1.1 lib/aio/base/toolkit/date.rb
aio_elin-1.1.0 lib/aio/base/toolkit/date.rb
aio_elin-1.0.9 lib/aio/base/toolkit/date.rb
aio_elin-1.0.8 lib/aio/base/toolkit/date.rb
aio_elin-1.0.7 lib/aio/base/toolkit/date.rb
aio_elin-1.0.6 lib/aio/base/toolkit/date.rb
aio_elin-1.0.5 lib/aio/base/toolkit/date.rb
aio_elin-1.0.4 lib/aio/base/toolkit/date.rb
aio_elin-1.0.3 lib/aio/base/toolkit/date.rb
aio_elin-1.0.2 lib/aio/base/toolkit/date.rb
aio_elin-1.0.1 lib/aio/base/toolkit/date.rb
aio_elin-1.0.0 lib/aio/base/toolkit/date.rb
aio_elin-0.0.1 lib/aio/base/toolkit/date.rb