Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
108 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module ApplicationTimeHelper | ||
def app_time | ||
if Rails.env.production? | ||
Time.current | ||
else | ||
SessionToggle.new(session, 'app_time').value || Time.current | ||
end | ||
end | ||
|
||
|
||
def withdrawal_date_deadline | ||
# binding.pry | ||
case params[:us_state] | ||
when 'ny' | ||
Rails.configuration.state_file_withdrawal_date_deadline_ny | ||
else | ||
# Arizona's withdrawal date deadline is the same as the end-new-intakes date which is set in PDT, | ||
# if this was during daylight-savings, it would be different except in the Navajo Nation | ||
Rails.configuration.state_file_end_of_new_intakes | ||
end | ||
end | ||
|
||
def before_withdrawal_date_deadline? | ||
app_time < withdrawal_date_deadline | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters