Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
FiscalYear is calculates half-year, quarter-year, and YTD figures. It can take in a year's numerical value or a year and month and return the results as a Range.
Additionally, it allows for the customization of the starting month of the fiscal period.
gem 'fiscal_year'
then,
bundle install
require 'fiscal_year'
FiscalYear.quarters
=> [[4, 5, 6], [7, 8, 9], [10, 11, 12], [1, 2, 3]]
date = Date.parse('2023/08/01')
# get current Half range
FiscalYear::Half.range_by(date)
=> Sat, 01 Apr 2023..Sat, 30 Sep 2023
# get current quarter range
FiscalYear::Quarter.range_by(date)
=> Sat, 01 Jul 2023..Sat, 30 Sep 2023
# get year to date
FiscalYear::YearToDate.range_by(date)
=> Sat, 01 Apr 2023..Thu, 31 Aug 2023
configure start month
FiscalYear.configure do |config|
config.start_month = 4
end
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
.
Bug reports and pull requests are welcome on GitHub at https://github.com/TsubasaKawajiri/fiscal_year. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the FiscalYear project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that fiscal_year demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.