Socket
Book a DemoInstallSign in
Socket

forex_date

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

forex_date

1.0.4
bundlerRubygems
Version published
Maintainers
1
Created
Source

ForexDate

Calculate the date of the current forex day.

A forex week begins when the Wellington/Sydney forex markets open (Sun 5pm EST) and closes when the New York forex market closes (Fri 5pm EST).

In order to calculate daily OHCL bars, the around the clock forex week can be split in 5 days:

dayfromto
mondaySun 5pm ESTMon 5pm EST
tuesdayMon 5pm ESTTue 5pm EST
wednesdayTue 5pm ESTWed 5pm EST
thursdayWed 5pm ESTThu 5pm EST
fridayThu 5pm ESTFri 5pm EST

For example, if current time is Thu May 24 06:38:34 UTC 2012:

ForexDate.today => Thu, 24 May 2012

On saturdays and sundays it returns nil. If current time is Sat May 26 06:38:34 UTC 2012:

ForexDate.today => nil

Installation

Add this line to your application's Gemfile:

gem 'forex_date'

And then execute:

$ bundle

Or install it yourself as:

$ gem install forex_date

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Added some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

FAQs

Package last updated on 30 May 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.