Releases: ursm/date_values
Releases · ursm/date_values
v0.2.2
21 Mar 06:04
Compare
Sorry, something went wrong.
No results found
TimeOfDay#- accepts TimeOfDay to return difference in seconds
v0.2.1
21 Mar 05:14
Compare
Sorry, something went wrong.
No results found
Add TimeOfDay arithmetic (+, -), advance, change, to_seconds, .from_seconds
Add YearMonth#advance, YearMonth#change, YearMonth#days
Add MonthDay#change
Add #as_json to all value classes
Add DateValues.config.month_day_order for locale-dependent MonthDay.parse
v0.2.0
20 Mar 08:45
Compare
Sorry, something went wrong.
No results found
Breaking : Rails integration extracted to date_values-rails .
require 'date_values/rails' now requires installing the date_values-rails gem.
bundle add date_values-rails
v0.1.4
20 Mar 07:26
Compare
Sorry, something went wrong.
No results found
Cast returns nil for invalid input instead of raising, following Rails convention
Add date_value validator to distinguish "invalid input" from "no input"
#inspect now uses #<ClassName value> format following Ruby convention
Works with Rails standard validators (comparison, inclusion, exclusion)
v0.1.3
19 Mar 15:28
Compare
Sorry, something went wrong.
No results found
Fix ActiveRecord type registration — use ActiveSupport.on_load(:active_record) to register types regardless of load order
Values now work directly in ActiveRecord queries (Shop.where(billing_month: YearMonth.new(2026, 3)))
v0.1.2
19 Mar 14:44
Compare
Sorry, something went wrong.
No results found
Add #strftime to YearMonth, MonthDay, and TimeOfDay
Add I18n backend extension for Rails l helper — looks up year_month.formats, month_day.formats, and time_of_day.formats in locale files
v0.1.1
19 Mar 14:09
Compare
Sorry, something went wrong.
No results found
Add .from class methods for converting from Date / Time (YearMonth.from(date), MonthDay.from(date), TimeOfDay.from(time))
v0.1.0
19 Mar 13:44
Compare
Sorry, something went wrong.
No results found
Initial release
DateValues::YearMonth — year-month value object with arithmetic (+, -), Range support, and Date conversion
DateValues::MonthDay — month-day value object with ISO 8601 --MM-DD format
DateValues::TimeOfDay — time-of-day value object with optional seconds
All classes are Data.define-based (immutable, value equality) and include Comparable
require 'date_values/rails' registers ActiveModel types (:year_month, :month_day, :time_of_day)
RBS type signatures included