module PartialDate
Public module containing Date
, Error and Version types.
Constants
- ABBR_MONTH_NAMES
- DAY_MASK
Key:
The first 5 bits are the day (max 31) The next 4 bits are the month (max 12) The next 20 bits are the year (max 1048576) The most significant bit (MSB) is a 1 bit sign bit (for negative years).
- FORMATS
TODO: Implement i18n support detecting whether a load path has been set or not and if not - setting it here to a default set of translations that match the generally available tranlsations for localizing dates.
github.com/svenfuchs/i18n/blob/master/lib/i18n/backend/base.rb format = format.to_s.gsub(/%/) do |match|
case match when '%a' then I18n.t(:"date.abbr_day_names", :locale => locale, :format => format)[object.wday] when '%A' then I18n.t(:"date.day_names", :locale => locale, :format => format)[object.wday] when '%b' then I18n.t(:"date.abbr_month_names", :locale => locale, :format => format)[object.mon] when '%B' then I18n.t(:"date.month_names", :locale => locale, :format => format)[object.mon] when '%p' then I18n.t(:"time.#{object.hour < 12 ? :am : :pm}", :locale => locale, :format => format) if object.respond_to? :hour end
end
- FORMAT_METHODS
- MONTH_MASK
- MONTH_NAMES
- MONTH_SHIFT
- REMOVALS
- SIGN_MASK
- SIGN_SHIFT
- VERSION
partial-date version
- YEAR_MASK
- YEAR_SHIFT
- ZERO_DAY_MASK
- ZERO_MONTH_MASK
- ZERO_SIGN_MASK
- ZERO_YEAR_MASK