
Security News
CISA’s 2025 SBOM Guidance Adds Hashes, Licenses, Tool Metadata, and Context
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
The Darian calendar is a proposed system of time-keeping designed to serve the needs of any possible future human settlers on the planet Mars. It was created by aerospace engineer and political scientist Thomas Gangale in 1985 and named by him after his son Darius. (Wikipedia)
This Ruby library converts earth time to mars time and back again. You can choose between 5 variants of the Darian calendar system; Martiana, Defrost, Areosynchronous, Hensel and Aqua.
It's based on the JavaScript Converter which was developed by Alan Hensel and Thomas Gangale.
In Bundler:
gem "darian_calendar"
Otherwise:
[sudo|rvm] gem install darian_calendar
require 'darian_calendar'
mars_time = DarianCalendar.now
mars_time = DarianCalendar.now(DarianCalendar::CalendarTypes::DEFROST)
mars_time = DarianCalendar::Time.now
mars_time = DarianCalendar::Time.now(DarianCalendar::CalendarTypes::AREOSYNCHRONOUS)
mars_time = DarianCalendar::Time.from_earth(Time.utc(2012, 10, 15, 16, 50, 0))
mars_time = DarianCalendar::Time.from_earth(Time.utc(2012, 10, 15, 16, 50, 0), DarianCalendar::CalendarTypes::AQUA)
mars_time = DarianCalendar::Time.parse_earth('2012-10-15 16:50:00 UTC')
mars_time = DarianCalendar::Time.parse_earth('2012-10-15 16:50:00 UTC', DarianCalendar::CalendarTypes::MARTIANA)
mars_date = DarianCalendar::Date.today
mars_date = DarianCalendar::Time.now.to_date
mars_time.to_s #=> '214-14-26 20:10:02'
mars_time.year #=> 214
mars_time.month #=> 14
mars_time.sol #=> 26
mars_time.hour #=> 20
mars_time.min #=> 10
mars_time.sec #=> 2
mars_time.total_sols #=> 143466.84030197054
mars_time.season #=> 2
mars_time.sol_of_season #=> 53
mars_time.month_of_season #=> 1
mars_time.sol_of_year #=> 387
mars_time.week_sol #=> 5
mars_time.month_name #=> 'Sol Jovis'
mars_time.week_sol_name #=> 'Mithuna'
mars_time = DarianCalendar::Time.from_earth(Time.utc(2012, 10, 15, 16, 50, 0))
mars_time.to_earth #=> 2012-10-15 16:50:00 UTC
DarianCalendar::CalendarTypes::MARTIANA #=> Default
DarianCalendar::CalendarTypes::DEFROST
DarianCalendar::CalendarTypes::AREOSYNCHRONOUS
DarianCalendar::CalendarTypes::HENSEL
DarianCalendar::CalendarTypes::AQUA
This library aims to support and is tested against the following Ruby interpreters and versions:
Unit tests are provided for all of Darian Calendar's methods:
# From anywhere in the project directory:
bundle exec rspec
This Darian Calendar Ruby Gem is released under the European Union Public Licence V. 1.1.
FAQs
Unknown package
We found that darian_calendar demonstrated a not healthy version release cadence and project activity because the last version was released 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
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.