lib/csl/style/date.rb in csl-1.0.0.pre23 vs lib/csl/style/date.rb in csl-1.0.0
- old
+ new
@@ -2,12 +2,12 @@
class Style
class Date < Node
attr_defaults :'date-parts' => 'year-month-day'
- attr_struct :name, :form, :'range-delimiter', :'date-parts', :variable,
- *Schema.attr(:display, :formatting, :delimiter)
+ attr_struct :name, :form, :'range-delimiter', :'date-parts',
+ :variable, *Schema.attr(:formatting, :delimiter)
attr_children :'date-part'
alias date_parts date_part
alias parts date_part
@@ -47,15 +47,15 @@
def form
attributes[:form].to_s
end
def numeric?
- attributes[:form].to_s =~ /^numeric$/i
+ form =~ /^numeric$/i
end
def text?
- attributes[:form].to_s =~ /^text$/i
+ form =~ /^text$/i
end
def has_date_parts?
!date_parts.empty?
end
@@ -67,11 +67,11 @@
end
class DatePart < Node
has_no_children
- attr_struct :name, :form, :'range-delimiter',
- *Schema.attr(:formatting, :periods)
+ attr_struct :name, :form, :'range-delimiter', :'strip-periods',
+ *Schema.attr(:formatting)
include CSL::DatePart
end
end
\ No newline at end of file