lib/fitbit_api/helpers/utils.rb in fitbit_api-0.8.1 vs lib/fitbit_api/helpers/utils.rb in fitbit_api-0.8.2
- old
+ new
@@ -3,10 +3,10 @@
PERIODS = %w(1d 7d 30d 1w 1m 3m 6m 1y max)
def format_date(date)
if [Date, Time, DateTime].include?(date.class)
- date.strftime("%Y-%m-%d")
+ date.strftime('%Y-%m-%d')
elsif date.is_a? String
if date =~ /\d{4}\-\d{2}\-\d{2}/
date
else
raise FitbitAPI::InvalidArgumentError, "Invalid argument [\"#{date}\"] - string must follow yyyy-MM-dd format."