Class: Todoist

Inherits:
Object
  • Object
show all
Defined in:
lib/todoist/due.rb,
lib/todoist/sync.rb,
lib/todoist/task.rb,
lib/todoist/label.rb,
lib/todoist/comment.rb,
lib/todoist/project.rb,
lib/todoist/section.rb,
lib/todoist/utilities.rb,
lib/todoist/date_parser.rb,
lib/todoist/current_time.rb,
lib/todoist/struct_cleanup.rb,
lib/todoist/file_attachment.rb

Defined Under Namespace

Modules: StructCleanup Classes: Comment, DateParser, Due, FileAttachment, Label, Project, Section, Sync, Task, Utilities

Constant Summary collapse

RECURRING_REGEX =
/ev(?:ery)?\s+(\d+)\s+(minutes|hours|days|weeks|months|years)/i
HOURS_PER_UNIT =
{"minutes" => 1 / 60.0, "hours" => 1.0, "days" => 24.0, "weeks" => 24.0 * 7, "months" => 24.0 * 30, "years" => 24.0 * 365.25}.freeze

Class Method Summary collapse

Class Method Details

.nowObject



5
6
7
# File 'lib/todoist/current_time.rb', line 5

def now
  Time.now.utc
end

.todayObject



9
10
11
# File 'lib/todoist/current_time.rb', line 9

def today
  now.to_date
end