Flowdock
method

civil_from_format

Importance_1
v4.0.2 - Show latest stable - 0 notes - Class: DateTime
civil_from_format(utc_or_local, year, month=1, day=1, hour=0, min=0, sec=0) public

Returns DateTime with local offset for given year if format is local else offset is zero.

DateTime.civil_from_format :local, 2012
# => Sun, 01 Jan 2012 00:00:00 +0300
DateTime.civil_from_format :local, 2012, 12, 17
# => Mon, 17 Dec 2012 00:00:00 +0000
Show source
Register or log in to add new notes.