Created
December 15, 2016 04:27
-
-
Save jquave/9c12ec71ead5852a9bd791b5fcc08c25 to your computer and use it in GitHub Desktop.
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
require 'date' | |
class WFGet | |
def self.current_quarter | |
yr = Date.today.year | |
if yr >=10 | |
4 | |
elsif yr >= 7 | |
3 | |
elsif yr >= 4 | |
2 | |
else | |
1 | |
end | |
end | |
def self.todays_edgar_url | |
# Current quarter, 1 - 4 | |
qtr_num = self.current_quarter | |
# Current year 2016 format | |
yr = Date.today.year | |
# Filename from date | |
filename = Date.today.strftime("%Y%m%d") + ".nc.tar.gz" | |
"https://www.sec.gov/Archives/edgar/Feed/#{yr}/QTR#{qtr_num}/#{filename}" | |
end | |
def self.get_todays_data | |
puts "WFGet::get_todays_data" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment