Top Level Namespace

Defined Under Namespace

Modules: Sculd

Constant Summary collapse

OPTIONS =

option analysis

{}
WEEKDAYS =
%w(Sun Mon Tue Wed Thu Fri Sat)
TODAY =
DateTime.now
SCULD_CONF =

Command ‘sculd’ can show events and tasks. Events include schedule and deadline(start and end). Tasks include deadline, reminder and todo.

"#{ENV['HOME']}/.sculd"

Instance Method Summary collapse

Instance Method Details

#analyze_date(str) ⇒ Object



33
34
35
36
37
38
39
# File 'bin/dates', line 33

def analyze_date(str)
  nums = str.split(/[\-\/]/).map{|i| i.to_i}
  nums = [TODAY.day         ] if nums.size == 0
  nums = [TODAY.month, *nums] if nums.size == 1
  nums = [TODAY.year,  *nums] if nums.size == 2
  Date.new(* nums)
end