mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-12 07:32:37 +01:00
Update the date formatting syntax
This commit is contained in:
parent
3fc943ce2a
commit
13bdef74b3
14 changed files with 36 additions and 36 deletions
2
test/fixtures/contexts.yml
vendored
2
test/fixtures/contexts.yml
vendored
|
|
@ -5,7 +5,7 @@
|
|||
<%
|
||||
|
||||
def today
|
||||
Time.zone.now.utc.to_s(:db)
|
||||
Time.zone.now.utc.to_formatted_s(:db)
|
||||
end
|
||||
|
||||
%>
|
||||
|
|
|
|||
6
test/fixtures/notes.yml
vendored
6
test/fixtures/notes.yml
vendored
|
|
@ -4,15 +4,15 @@
|
|||
# rails does automatically in models or controllers! Convert to utc manually!
|
||||
<%
|
||||
def today
|
||||
Time.zone.now.utc.to_s(:db)
|
||||
Time.zone.now.utc.to_formatted_s(:db)
|
||||
end
|
||||
|
||||
def next_week
|
||||
1.week.from_now.utc.to_s(:db)
|
||||
1.week.from_now.utc.to_formatted_s(:db)
|
||||
end
|
||||
|
||||
def last_week
|
||||
1.week.ago.utc.to_s(:db)
|
||||
1.week.ago.utc.to_formatted_s(:db)
|
||||
end
|
||||
%>
|
||||
|
||||
|
|
|
|||
6
test/fixtures/projects.yml
vendored
6
test/fixtures/projects.yml
vendored
|
|
@ -4,13 +4,13 @@
|
|||
# rails does automatically in models or controllers! Convert to utc manually!
|
||||
<%
|
||||
def today
|
||||
Time.zone.now.utc.beginning_of_day.to_s(:db)
|
||||
Time.zone.now.utc.beginning_of_day.to_formatted_s(:db)
|
||||
end
|
||||
def yesterday
|
||||
1.day.ago.utc.beginning_of_day.to_s(:db)
|
||||
1.day.ago.utc.beginning_of_day.to_formatted_s(:db)
|
||||
end
|
||||
def last_week
|
||||
1.week.ago.utc.beginning_of_day.to_s(:db)
|
||||
1.week.ago.utc.beginning_of_day.to_formatted_s(:db)
|
||||
end
|
||||
%>
|
||||
|
||||
|
|
|
|||
12
test/fixtures/recurring_todos.yml
vendored
12
test/fixtures/recurring_todos.yml
vendored
|
|
@ -3,27 +3,27 @@
|
|||
|
||||
<%
|
||||
def today
|
||||
Time.zone.now.utc.beginning_of_day.to_s(:db)
|
||||
Time.zone.now.utc.beginning_of_day.to_formatted_s(:db)
|
||||
end
|
||||
|
||||
def next_week
|
||||
1.week.from_now.utc.beginning_of_day.to_s(:db)
|
||||
1.week.from_now.utc.beginning_of_day.to_formatted_s(:db)
|
||||
end
|
||||
|
||||
def last_week
|
||||
1.week.ago.utc.beginning_of_day.to_s(:db)
|
||||
1.week.ago.utc.beginning_of_day.to_formatted_s(:db)
|
||||
end
|
||||
|
||||
def two_weeks_ago
|
||||
2.weeks.ago.utc.beginning_of_day.to_s(:db)
|
||||
2.weeks.ago.utc.beginning_of_day.to_formatted_s(:db)
|
||||
end
|
||||
|
||||
def two_weeks_hence
|
||||
2.weeks.from_now.utc.beginning_of_day.to_s(:db)
|
||||
2.weeks.from_now.utc.beginning_of_day.to_formatted_s(:db)
|
||||
end
|
||||
|
||||
def way_back
|
||||
Time.zone.local(2008,1,1).utc.to_s(:db)
|
||||
Time.zone.local(2008,1,1).utc.to_formatted_s(:db)
|
||||
end
|
||||
|
||||
%>
|
||||
|
|
|
|||
2
test/fixtures/tags.yml
vendored
2
test/fixtures/tags.yml
vendored
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<%
|
||||
def today
|
||||
Time.zone.now.utc.beginning_of_day.to_s(:db)
|
||||
Time.zone.now.utc.beginning_of_day.to_formatted_s(:db)
|
||||
end
|
||||
%>
|
||||
|
||||
|
|
|
|||
12
test/fixtures/todos.yml
vendored
12
test/fixtures/todos.yml
vendored
|
|
@ -8,27 +8,27 @@ def yesterday
|
|||
Time.zone.now.utc.beginning_of_day - 1.day
|
||||
end
|
||||
def today
|
||||
Time.zone.now.utc.beginning_of_day.to_s(:db)
|
||||
Time.zone.now.utc.beginning_of_day.to_formatted_s(:db)
|
||||
end
|
||||
|
||||
def tomorrow
|
||||
(Time.zone.now.utc.beginning_of_day + 1.day).to_s(:db)
|
||||
(Time.zone.now.utc.beginning_of_day + 1.day).to_formatted_s(:db)
|
||||
end
|
||||
|
||||
def next_week
|
||||
1.week.from_now.utc.beginning_of_day.to_s(:db)
|
||||
1.week.from_now.utc.beginning_of_day.to_formatted_s(:db)
|
||||
end
|
||||
|
||||
def last_week
|
||||
1.week.ago.utc.beginning_of_day.to_s(:db)
|
||||
1.week.ago.utc.beginning_of_day.to_formatted_s(:db)
|
||||
end
|
||||
|
||||
def two_weeks_ago
|
||||
2.weeks.ago.utc.beginning_of_day.to_s(:db)
|
||||
2.weeks.ago.utc.beginning_of_day.to_formatted_s(:db)
|
||||
end
|
||||
|
||||
def two_weeks_hence
|
||||
2.weeks.from_now.utc.beginning_of_day.to_s(:db)
|
||||
2.weeks.from_now.utc.beginning_of_day.to_formatted_s(:db)
|
||||
end
|
||||
|
||||
%>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue