class CSL::Locale::Date
A localized Date
comprises a set of formatting rules for dates.
Attributes
Public Class Methods
Source
# File lib/csl/locale/date.rb, line 13 def initialize(attributes = {}) super(attributes) children[:'date-part'] = [] yield self if block_given? end
Calls superclass method
Public Instance Methods
Source
# File lib/csl/locale/date.rb, line 20 def added_to(node) raise ValidationError, "parent must be locale node: was #{node.inspect}" unless node.is_a?(Locale) end
Source
# File lib/csl/locale/date.rb, line 24 def delimiter attributes.fetch(:delimiter, '') end
Source
# File lib/csl/locale/date.rb, line 44 def has_date_parts? !date_parts.empty? end
Also aliased as: has_parts?
Source
# File lib/csl/locale/date.rb, line 40 def numeric? attributes[:form].to_s =~ /^numeric$/i end